GET /API/USERAUTHTOKEN
CREATE A SINGLE USE AUTHENTICATION TOKEN.
Create a single use login authentication token for the user which credentials were supplied in the authentication header. This token can then be used to access the web portal or call other REST api calls.
When retrieved, you can login to your CallN account with
e.g. https://mycompany.calln.com/?authtoken={token}
QUERY STRING PARAMETERS
durationminutes [optional] | The number of minutes the token is valid for. The maximum value is 60 minutes and the default is 10 minutes if not provided. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
domainname [optional] | By default, the domain of the user who requested the token. For reseller accounts, you can request very limited access to one of your associated client accounts. This permission can only include upload a call and modify handsets. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
rights [optional] |
|
RESULT CODE
200 | OK |
---|---|
401 | Unauthorized |
406 | SSL must be used |
500 | Server Error |
RESULT BODY
token | The authentication token. |
---|---|
expiry | The expiry of the token. |
EXAMPLE REQUEST
Example;- GET https://api.calln.com/api/userauthtoken Result;- 200 (OK) {"token":"e553a4e6b9dc4c9595ba634523eb6b44","expiry":"2019-04-10T06:41:24.000Z"}
USING CURL
GET A TOKEN
curl "https://api.calln.com/api/userauthtoken" -H "Authorization: Basic username:password | base64" -X GET
GET A TOKEN FOR YOUR CLIENT ACCOUNT ‘MYCLIENT’
curl "https://api.calln.com/api/userauthtoken?domainname=myclient&rights=HANDSETCREATE,CALLCREATE,CALLAUDIOCREATE" -H "Authorization: Basic username:password | base64" -X GET