AUTH
Generate a new access token by giving the clientId and clientSecret.
Available in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
clientId | String | <hash> | require | Client ID |
clientSecret | String | <hash> | require | Client Secret |
scope | String | { api, api.read- only } | optional | Scope of the access token generated api – Read-write permission of API api.read-only – Read-only permission of API |
Return Parameters
Return JSON
Type | Notation | Description | |
accessToken | String | <hash> | Access token |
authorizationType | Number | { 3 } | Authorization type. Always out 3 for client credentials grant |
scope | String | { api, api.read-only } | The scope of the access token |
expiresIn | Number | <number> | Expires in seconds |
cURL Example
curl -b cookies.txt -H "Content-Type: application/json" -X POST -d '{"clientId":"0396c250111dcaef02058007bb72217e","clientSecret":"de5cd1c51252a13854d6bd7ddeabbcf5"," ope":"api"}' http://192.168.1.1/api/auth.token.grant
{ "stat": "ok", "response": { "accessToken": "43c65216eb16d779092fc40b184a1794", "authorizationType": 3, "scope": "api", "expiresIn": 172800 } }