# Query rid information
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 Name | type | Required to fill in | Introductions |
---|---|---|---|
access_token | string | yes | Interface invocation credentials, using access_token , component_access_token |
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
rid | string | yes | The rid returned by calling the interface error |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Return code |
errmsg | string | Error message |
request | object | Request details for this rid |
# Res.requestObject Payload
Request details for this rid
Parameter Name | type | Introductions |
---|---|---|
invoke_time | number | timestamp when the request was initiated |
cost_in_ms | number | Requests in milliseconds take time |
request_url | string | Requested URL parameter |
request_body | string | Request parameters for post requests |
response_body | string | Interface Request Returns Parameters |
client_ip | string | Guest 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.
- 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 code | Error Description | Solutions |
---|---|---|
0 | ok | ok |
76001 | rid not found | Rid does not exist |
76002 | rid is error | Rid is empty or formatted in error |
76003 | could not query this rid,no permission | The current account has no right to query the rid, which belongs to the call of other accounts. |
76004 | rid time is error | Rid expires, only supports 7 days of rid |
# 7. Scope of application
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 |
---|---|---|---|---|---|---|---|---|---|---|---|
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | 〇 | ✔ | ✔ | ✔ | ✔ |
- ✔: The account can call this interface
- 〇: Third Party Platform can be invoked using component_access_token . See this document for support for invoking on behalf of the merchant Methods of Invoking sections