This endpoint refreshes your Token
Enterprise license
This feature requires an Enterprise License. Please contact [email protected] for further information.
Request
To refresh a Token, please make a POST request to the following URL pointing to your app domain:
HTTP Method | URL |
---|---|
POST | 'https://<YOUR_APP_DOMAIN>/o/token' |
Key Parameters
Key | Type | Value | Required? | Description |
---|---|---|---|---|
grant_type | String | refresh_token | Yes | The grant authorization type |
client_id | String | - | Yes | The client ID of your account |
client_secret | String | - | Yes | The client secret of your account |
refresh_token | String | - | Yes | The refresh token of the session |
Header
Parameter | Type | Description |
---|---|---|
Content-Type | String(application/x-www-form-urlencoded) | Content type of keys |
curl --location --request POST 'https://leo-castellanos-98f30.iot.ubidots.com/o/token/' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'grant_type=refresh_token' \
--data 'refresh_token=aFcDvEmm0zDjJd4vcSE9AtMlIcnpoP' \
--data 'client_id=CNpL7wnnnBdTp8uUNKDK5KjT8cV28TA6wOu4Psst' \
--data 'client_secret=TC8B8vSeVNCOuMyGIZ4Pmxjf52c8dPyteJRVjxxai5SIpNmI0APluWHBr0XLzs6i6GGAN5cViY7DnzqypKcetaq8Msky9hOeHYu46C96hgIfldqpo5IVWQJ2M57KEHhe'
{
"access_token": "N7Fon7NqjdpaoqepcDqQH30CjXlBv0",
"expires_in": 36000,
"token_type": "Bearer",
"scope": "write",
"refresh_token": "gLZKiCclMnNNNZeUZ9uNcyj1DqzVWn"
}
{
"error": "invalid_grant",
"error_description": "Invalid credentials given."
}
Returns an Object containing the oAuth2 session.