Querying RID Information

Debug Tool View llm.txt

Last edited on 2026-03-16

This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.

API English Name: getRidInfo

This interface is used to query the detailed information of an RID returned due to an error when calling a server-side interface, helping developers efficiently locate issues.

The account types that can use this interface include: Official Accounts, Service Accounts, Mini Programs, Mini Games, WeChat Stores, Shopping Assistants, Video Account Assistants, Alliance Shopping Agencies, Mobile Applications, Web Applications, Multi-platform Applications, and Third-party Platforms.

1. Call Method

HTTPS Call

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

Encryption Support: This API supports secondary encryption and signature for service communication, which can effectively prevent data tampering and leakage. View Details

Cloud Call

  • This API does not support cloud call.

Third-party Call

  • This API supports third-party platforms to call using component_access_token, and also supports calling on behalf of Merchant call.

  • After the service provider obtains any permission set authorization, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.

2. Request Parameters

Query Parameters Query String Parameters

ParameterTypeRequiredDescription
access_tokenstringYesAPI call credential, you can use access_token, component_access_token, authorizer_access_token

Request Body Request Payload

ParameterTypeRequiredDescription
ridstringYesThe RID returned due to an error when calling the interface.

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberReturn code.
errmsgstringError message.
requestobjectRequest details corresponding to the RID.

Res.request Object Payload

Request details corresponding to the RID.

ParameterTypeDescription
invoke_timenumberTimestamp when the request was initiated.
cost_in_msnumberMillisecond-level request duration.
request_urlstringURL parameters of the request.
request_bodystringRequest parameters for POST requests.
response_bodystringParameters returned by the interface request.
client_ipstringClient IP address of the interface request.

4. Notes

  1. Since querying RID information is a private developer action, it is only supported for queries using the same account. For example, if rid=1111 indicates an error occurred when Mini Program Account A called a certain interface, then Account A’s access_token must be used to query the details of rid=1111. Using another account’s credentials will result in an error with code xxx. The same applies to interfaces for Official Accounts and Third-party Platform accounts.

  2. If a third-party service provider is querying the RID returned by an API on behalf of an Official Account, Service Account, Mini Program, Mini Game, WeChat Store, Shopping Assistant, or Video Account Assistant, then the authorizer_access_token of the same account should be used for the query.

  3. The validity period of a RID is only 7 days, meaning only RIDs from the past 7 days can be queried. Querying RIDs older than 7 days will result in an error with code 76001.

  4. Interfaces of the format “/xxx/sns/xxx” do not support this query and will result in an error with code 76022.

5. Code Example

Request Example

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

Response 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 Codes

The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.

Error CodeError DescriptionSolution
0okok
76001rid not foundThe RID does not exist.
76002rid is errorThe RID is empty or has an invalid format.
76003could not query this rid,no permissionThe current account does not have permission to query this RID; it was generated by another account’s call.
76004rid time is errorThe RID has expired. Only RIDs within the last 7 days are supported.

7. Applicable Scope

API callable status for different account types:
Mini ProgramOfficial AccountService AccountMini GameWeChat ShopAlliance AgencyInfluencerShop SupplierThird-party PlatformMobile AppWebsite AppChannels WindowMulti-platform App
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ 〇 ✔ ✔ ✔ ✔
  • ✔:This account type can call this API。
  • 〇:Third-party platforms can use component_access_token to call. For calling on behalf of Merchant, please refer to the Call Method section。