This document describes how client can obtain access token for authenticating a user and use that token to access Amino APIs.
...
- A User can be authenticated by using our access token, client should first get use the access token using login end point. See Login and authentication#/User%20Authentication/loginUserAll new AminoTV
- APIs only support token auth. Once successfully authenticated, login end point provides access token and refresh token.
- Some users are logged in by cookie, for such cases access tokens can be obtained by cookie <-> token exchange process, See https://confluence.aminocom.com/display/MAPI/Cookie-token+exchange for the exchange process.
An example response from login end point after successful login:
Code Block |
---|
{
"userStat": {
"maxAllowedSession": 1000,
"currentSession": 1,
"migrated": false,
"configuration": 1,
"emailSubscription": {
"all": "email"
},
"premiumUser": false,
"streamingOver3G": true,
"accessToken": [
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjb20uYW1pbm9jb20iLCJhdWQiOiJjb20uYW1pbm9jb20iLCJ0eXBlIjoiYWNjZXNzIiwianRpIjoiNDFRazVpSzMzRyIsImlhdCI6MTU2MDQ0NTE0MiwibmJmIjoxNTYwNDQ1MTQyLCJleHAiOjE1NjA0NDg3NDIsImRhdGEiOnsidXNlcklkIjoiMiIsInVzZXJfZW1haWwiOiJhdXRoX3VzZXJAZW1haWwuY29tIn0sInN1YiI6IjIifQ.Ij5sAjR-hLeT9TPJHqDNe1nGQS_2iFBNYT5NWWWoP74",
1560448742
],
"refreshToken": [ "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjb20uYW1pbm9jb20iLCJhdWQiOiJjb20uYW1pbm9jb20iLCJ0eXBlIjoicmVmcmVzaCIsImp0aSI6Ik5GaGhRSno4QlgiLCJpYXQiOjE1NjA0NDUxNDIsIm5iZiI6MTU2MDQ0NTE0MiwiZXhwIjoxNTYzMDM3MTQyLCJkYXRhIjp7InVzZXJJZCI6IjIiLCJ1c2VyX2VtYWlsIjoiYXV0aF91c2VyQGVtYWlsLmNvbSJ9LCJzdWIiOiIyIn0.7NNRoYHWuLpBh6MOVFsMO-dIi-zyfCinqWR1ytuadac",
1563037142
]
}
} |
Info |
---|
The second item in the Access token and Refresh token array is the expiration time for the respective tokens. |
Access token using User Profile ID:
...