client_id
and client_secret
.Read specs for Authorization Code Grant
redirect_uri
parameterRequest
https://app.unet.com/auth?response_type=code&client_id=1234567890&redirect_uri=https%3A%2F%2Fmysite.com%2Funet
Read specs for Access Token Request/Response
Request
https://app.unet.com/token?grant_type=authorization_code&client_id=1234567890&client_secret=1a2b3c4e5d&code=CODE&redirect_uri=https%3A%2F%2Fmysite.com%2Funet
Response
{
"access_token": "gb98URsdfsdfPyapVQBWNYhs4HA2EAYEScuuuJfB79u",
"expires_in": "43200",
"refresh_token": "1lYGndlWNfxYLzQt4eJXWNY4rs4Hh2EAYEScuuub8gocZ",
"resource_uri": "https://3801130518.unet.com/api/",
"scope": "user_details messages_read messages_write",
"token_type": "bearer",
"user_id": "3801130518"
}
Read specs for Refreshing an Access Token
Request
https://app.unet.com/token?grant_type=refresh_token&client_id=1234567890&client_secret=1a2b3c4e5d&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
Response
{
"access_token": "gb98URsdfsdfPyapVQBWNYhs4HA2EAYEScuuuJfB79u",
"expires_in": "43200",
"refresh_token": "1lYGndlWNfxYLzQt4eJXWNY4rs4Hh2EAYEScuuub8gocZ",
"resource_uri": "https://3801130518.unet.com/api/",
"scope": "user_details messages_read messages_write",
"token_type": "bearer",
"user_id": "3801130518"
}
Read specs for Authorization Errors
{
"error":"invalid_grant",
"error_description":"Invalid refresh token."
}
Name | Description |
---|---|
response_type (r) |
Specify this parameter as |
client_id (r) |
An application identifier. |
redirect_uri (r) |
URI where a native client is redirected after the request. |
state (o) |
An opaque value used by the client to maintain state between the request and callback. |
scope (o) |
List of space-delimited scopes that need to request during current authorization. |
Name | Description |
---|---|
grant_type (r) |
Specify this parameter as |
client_id (r) |
An application identifier. |
client_secret (r) |
An application secret signature. |
redirect_uri (r) |
URI for client redirect after authorization is complete. |
code (r) |
A CODE string retrieved as a result of the Authorization request. |
Name | Description |
---|---|
access_token |
The access token issued by the authorization server. |
expires_in |
The lifetime in seconds of the access token. |
refresh_token |
The refresh token issued to the client. |
scope |
List of space-delimited scopes requested by the client. |
token_type |
Possible values:
|
user_id |
Unet user ID |
resource_uri |
URI for further actions within the Unet API. |
Name | Description |
---|---|
grant_type (r) |
Specify this parameter as |
client_id (r) |
An application identifier. |
client_secret (r) |
An application secret signature. |
refresh_token (r) |
A refresh token was recieved during the Get Access Token request. |
scope (o) |
List of space-delimited scopes that need to request during current authorization. |
Name | Description |
---|---|
error |
Possible values:
|
error_description |
Human-readable text providing additional information. |