Get Access

Get Access Token

Changed on

Gives you an access token in exchange for your refresh token. The access token is valid for 24 hours, and every other endpoint needs it.

This is the only endpoint that uses the refresh token. It does not use the bearer token from the Authentication panel. Put the refresh token in this request's Authorization field instead. Then put the access token it returns in the panel.

Request

No query parameters and no request body. Only the two headers below.

WhereNameRequiredValue
Headerx-api-keyYesYour developer API key.
HeaderAuthorizationYesBearer <refresh_token>. Use the refresh token here, not an access token.

Response

{
  "status": "Success",
  "message": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6..."
  }
}
FieldTypeMeaning
statusstringSuccess or Error.
message.access_tokenstringA JWT valid for 24 hours. Send it as Authorization: Bearer <access_token> on every other endpoint.

Reuse the token for 24 hours. Each new token uses one call from your quota, so getting a new token before every request can use up your whole daily quota.

get/get_access_token

Request

  • Base URL
    https://api.developer.atomberg-iot.com/v2
  • Auth
    API key in header x-api-key

Headers

Authorizationstring required

Your refresh token, with Bearer in front. Enter it here, not in the Authentication panel above. That panel holds the 24-hour access token used by the other endpoints.

Response

OK

statusstring

Success on a 2xx, Error otherwise.

Example response

{
  "status": "Success"
}

Changes