# Short chains transition to longer information

Debugging Tools

Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide

Interface name: fetchShorten

Developers can convert long information not more than 4KB into short-chain key through GenShorten, and then restore short-chain key to long information through FetchShorten.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/shorten/fetch?access_token=ACCESS_TOKEN

# Cloud Calls

  • Call method: officialAccount.shorten.fetch

  • The input and exit parameters are the same as the HTTPS call, which can be called in the cloud call documentation

# Third party invocation

  • Third Party Platform calls are not supported by this interface.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invoke credentials, using access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inExampleIntroductions
short_keystringyesiTqRJFSEqk9RvPkShortkey

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError message
long_datastringLong information
create_timetimestampCreated timestamp
expire_secondsnumberNumber of remaining expiration seconds

# 4. Note

There are no special considerations for this interface

# 5. Code examples

Example Requests

{
  "short_key": "iTqRJFSEqk9RvPk"
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok",
  "long_data": "loooooong data",
  "create_time": 1611047541,
  "expire_seconds": 86300
}

# 6. Error code

The following is a list of error codes for this interface, other error codes can refer to General error codes

Error codeError DescriptionSolutions
-1system errorThe system is busy, so the developer is asked to try again in a few minutes.
44002empty post dataThe POST number is empty. The post request body parameter cannot be empty.
47001data format errorError parsing JSON / XML content; Missing parameters in post data; The review was amended and a second attempt was made.
47003argument invalid!Template parameter is inaccurate, may be empty or does not meet the rules, errmsg will indicate which field is wrong
9410012This page does not exist / is not available.

# 7. Scope of application

The interface has not yet clarified the types of account numbers that can be invoked, or determined whether they can be invoking based on the invoking reference in the business, provided that the actual call is already made.