Refresh Token

This endpoint refreshes your Token

Request

To refresh a Token, please make a POST request to the following URL pointing to your app domain:

HTTP MethodURL
POST'https://<YOUR_APP_DOMAIN>/o/token'

Key Parameters

KeyTypeValueRequired?Description
grant_typeStringrefresh_tokenYesThe grant authorization type
client_idString-YesThe client ID of your account
client_secretString-YesThe client secret of your account
refresh_tokenString-YesThe refresh token of the session

Header

ParameterTypeDescription
Content-TypeString(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.