Get token
| Properties | Values |
|---|---|
| HTTP method | POST |
| Interface path | /api/token.do |
| Category | Authentication API |
Interface description
Interface path: /api/token.do
HTTP method: POST
HTTP method: POST
HTTP Header
This interface uses Basic Auth to verify client information. The specific method is to add something like "Authorization: Basic xxxxxxxxx" in the header. Among them "xxxxxxxxx" is calculated from the developer id (client_id) and developer secret key (client_secret). The specific algorithm is Base64Encode(client_id + ":" + client_secret) Base64Encode Choose your own tool for Base64 encoding
URL parameters
Parameter name Comment (description) grant_type (required) must be authorization_code string code (required) Authorization code, that is, the authorization code received by the callback address. The authorization code is valid for 5 minutes. It is used once, regardless of success. If it still fails, the authorization code will become invalid string For example: /api/token.do?grant_type=authorization_code&code=xxx&redirect_uri=http://xxx.xxx.xxx Return results access_token interface access token refresh_token is used to refresh access_token, valid for 30 days The validity time of expires_in access_token, unit is s
Call instructions
- Before calling, you need to complete Get token or the corresponding login-free authentication, and carry
Authorization: Bearer <access_token>in the request header. - If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail.
- Category: Authentication API.