https://xxxxxx/$ver/$servicename/$command?sdkappid=$SDKAppID&identifier=$identifier&usersig=$usersig&random=99999999&contenttype=json
Parameter | Description | Value |
https | Request protocol | The request protocol is HTTPS, and the request method is POST. |
xxxxxx | Dedicated domain name | China: console.tim.qq.com (backup: adminapi.my-imcloud.com) Singapore: adminapisgp.im.qcloud.com (backup: adminapisgp.my-imcloud.com) Seoul:adminapikr.im.qcloud.com (backup: adminapikr.my-imcloud.com) Frankfurt: adminapiger.im.qcloud.com (backup: adminapiger.my-imcloud.com) Silicon Valley: adminapiusa.im.qcloud.com (backup: adminapiusa.my-imcloud.com) Jakarta: adminapiidn.im.qcloud.com (backup: adminapiidn.my-imcloud.com) |
ver | Protocol version number | Always v4 . |
servicename | Internal service name. Different values of servicename correspond to different service types. | Example:For v4/im_open_login_svc/account_import , im_open_login_svc is the servicename .For more information, see RESTful API List. |
command | Command word. This parameter is used with the servicename parameter to identify a specific service feature. | Example:For v4/im_open_login_svc/account_import , account_import is the command .For more information, see RESTful API List. |
sdkappid | App ID obtained in the Chat console | You can obtain the SDKAppID when applying for Chat SDK access. |
identifier | Username, which must be the app admin account when a RESTful API is called | |
usersig | Password that corresponds to the user name. | |
random | A parameter used to identify the current request | A random 32-bit unsigned integer ranging from 0 to 4,294,967,295 |
contenttype | Request format | Always json . |
identifier
must be the app admin account.UserSig
for the admin account each time it calls a RESTful API or generate a fixed UserSig
for reuse with period of validity.{}
).{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0// Other RESTful API response content}
ActionStatus
, ErrorInfo
, and ErrorCode
fields. These three fields are described as follows:Field | Type | Description |
ActionStatus | String | Request result. OK : Successful. FAIL : Failed. If the request fails, the cause of failure is displayed in the ErrorInfo field. |
ErrorInfo | String | Failure causes |
ErrorCode | Integer |
POST /v4/group_open_http_svc/get_appid_group_list?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json HTTP/1.1Host: console.tim.qq.comContent-Length: 22{"Limit": 2}
HTTP/1.1 200 OKServer: nginx/1.7.10Date: Fri, 09 Oct 2015 02:59:55 GMTContent-Length: 156Connection: keep-aliveAccess-Control-Allow-Origin: *Access-Control-Allow-Headers: X-Requested-WithAccess-Control-Allow-Methods: POST{"ActionStatus": "OK","ErrorCode": 0,"GroupIdList": [{"GroupId": "@TGS#1YTTZEAEG"},{"GroupId": "@TGS#1KVTZEAEZ"}],"TotalCount": 58530}
Error Code | Description |
60002 | HTTP parsing error. Check the URL format of the HTTP request. |
60003 | JSON parsing error. Check the JSON format of the HTTP request. |
60004 | Account or signature error in the request URL or JSON request body. |
60005 | Account or signature error in the request URL or JSON request body. |
60006 | Invalid SDKAppID. Check the validity of SDKAppID. |
60007 | RESTful API call frequency limit exceeded. Reduce your request frequency. |
60008 | Service request timeout or HTTP request format error. Check and try again. |
60009 | Request resource error. Check the request URL. |
60010 | The request requires app admin permissions. |
60011 | SDKAppID request frequency exceeded. Reduce your request frequency. |
60012 | SDKAppID is required for RESTful APIs. Check the SDKAppID parameter in the URL. |
60013 | JSON parsing error in the HTTP response body. |
60014 | Account switching timeout. |
60015 | Invalid account type in the request body. Make sure that the account is in string format. |
60016 | The SDKAppID is disabled. |
60017 | The request is disabled. |
60018 | Too many requests. Try again later. |
60019 | Too many requests. Try again later. |
60020 | Your Standard edition has expired and was disabled. Log in to the purchase page and purchase it again. It will take effect in five minutes upon successful purchase. |
60021 | The source IP of the RESTful API call is invalid. |
telnet console.tim.qq.com 443
to check whether the service port is accessible.curl -I https://console.tim.qq.com
to check whether the status code is 200.Connection: keep-alive
needs to be specified; for HTTP 1.1, persistent connections are supported by default; for scenarios where HTTPS requests are encapsulated based on TCP, TCP connections can be reused to send and receive requests.
문제 해결에 도움이 되었나요?