Apply Token
Type: GET
Description: /public/uaa/oauth2/token?client_id={client_id}&client_secret=${client_secret}&grant_type={grant_type}&code={code}
Parameters
name | type | mandatory | default | description | ranges |
---|---|---|---|---|---|
client_id | string | true | Institutional identity | Please apply to XT.COM | |
client_secret | string | true | Institutional Secret Key | Please apply to XT.COM | |
grant_type | string | true | Authorization type, fixed value | authorization_code | |
code | string | true | The user is redirected to the institution page after authorization. The code field will be carried in the URL |
Response Example
Response
{
"rc": 0,
"mc": "SUCCESS",
"ma": [],
"result": {
"user_id": "12345678",
"access_token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwidXNlci1pZCI6MSwic2NvcGUiOiJ1c2VyaW5mbyIsImlzcyI6Inh0LmNvbSIsImV4cCI6MTY5MTU2MTA3NiwiY2xpZW50X2lkIjoiMzVMRjJGU0xIWDVJUlFBNCJ9.vkSTiFLcQuO0qJqdm21MfmoLKb38wwhsKPCJI3x1xmOxYouH5GtmcYglk0XRxPeOMVZ-6E6tM3HGn1yMQdqTgHOVeAbtLSBBIqyUh6y-8j_MF8GyBwcEaRK2hfWBNOHw06B-0jLO_mKEduUWZXYHjNiAN2jenbj7Ba6MX7rcENk", // Token used to access the authorization interface. Default validity: 1 day
"refresh_token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIxIiwidXNlci1pZCI6MSwic2NvcGUiOiJ1c2VyaW5mbyIsImlzcyI6Inh0LmNvbSIsImV4cCI6MTY5NDE1MzA3NiwiY2xpZW50X2lkIjoiMzVMRjJGU0xIWDVJUlFBNCJ9.UIeGGDiiybfEUEPFAteN3TtCxz5PyZxGDIULaNJjO3mCck7s28nRpXWSxONMGYMXG03XxJVUJs5WfdpNEmKUmmoQQuy-UOCuvV7zLdFmwUHd5e5tDMA7mgTCxbCeyxYE4L8Vr8StEEhxwWbDFxG_-2wdNEgEIvlgg9bI87Qcy9s", // Token used to refresh the access token. Default validity: 180 days
"expires_in": 15551999, // Milliseconds before access_token expires
"refresh_expires_in": 18143999, // Milliseconds before refresh_token expires
"client_id": "35LF2FSLHX5IRQA4", // Institutional identity
"scope": "userinfo" // Authorized scope
}
}