# Query rid 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: getRidInfo

Official Account / Service Account / Weixin Mini Program/ MiniGame / Weixin Store / Delivery Assistant / Weixin Channels Assistant / Alliance Shipping Agency / Mobile App / Website App / Weixin Mini Program / Weixin Mini Program Such as interface error return RID details, assist developers to efficiently locate the problem.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/cgi-bin/openapi/rid/get?access_token=ACCESS_TOKEN

# Cloud Calls

  • This interface does not support cloud calls

# Third party invocation

  • This interface supports Third Party Platform calling itself using component_access_token , and also supports calling on behalf of merchants.

  • Once the service provider has any set of permissions authorized, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invocation credentials, using access_token , component_access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
ridstringyesThe rid returned by calling the interface error

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberReturn code
errmsgstringError message
requestobjectRequest details for this rid

# Res.requestObject Payload

Request details for this rid

Parameter NametypeIntroductions
invoke_timenumbertimestamp when the request was initiated
cost_in_msnumberRequests in milliseconds take time
request_urlstringRequested URL parameter
request_bodystringRequest parameters for post requests
response_bodystringInterface Request Returns Parameters
client_ipstringGuest ip requested by interface

# 4. Note

1, because the query rid information belongs to the developer's private behavior, it only supports the query of the same account.For example, rid = 1111 is an error that occurs when Weixin Mini Program account A invokes an interface.Then you need to use the access_token of Mini Program account A to call the current interface to query the details of rid = 1111. If you use Mini Program account B's identity query, an error is reported with the error code xxx.Official Account, Third Party Platform accounts and other accounts interface the same.

  1. If it is a third party service provider Official Account / Service Account / Weixin Mini Program / MiniGame / Weixin Store / Delivery Assistant / Weixin Channels Assistant Query the rid returned by calling the api, then use the authorizer_access_token call of the same account

3, the validity of the rid is only 7 days, that is, you can only query the most recent 7 days of the rid, query more than 7 days of the rid will appear an error, the error code is 76001

4, "/ xxx / sns / xxx" this kind of interface does not support the use of the interface, there will be 76022 error.

# 5. Code examples

Example Requests

{
  "rid": "61725984-6126f6f9-040f19c4"
}

Return an example

{
  "errcode": 0,
  "errmsg": "ok",
  "request": {
    "invoke_time": 1635156704,
    "cost_in_ms": 30,
    "request_url": "access_token=50_Im7xxxx",
    "request_body": "",
    "response_body": "{\"errcode\":45009,\"errmsg\":\"reach max api daily quota limit rid: 617682e0-09059ac5-34a8e2ea\"}",
    "client_ip": "113.xx.70.51"
  }
}

# 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
0okok
76001rid not foundRid does not exist
76002rid is errorRid is empty or formatted in error
76003could not query this rid,no permissionThe current account has no right to query the rid, which belongs to the call of other accounts.
76004rid time is errorRid expires, only supports 7 days of rid

# 7. Scope of application

How this interface can be invoked under different account types:
Weixin Mini Program Official Account Service Account MiniGame Weixin Store Alliance Shipping Agency Delivery Assistant Third Party Platform Mobile App Website App Weixin Channels Assistant Multi-platform App