Get Access Token
Changed onGives 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.
| Where | Name | Required | Value |
|---|---|---|---|
| Header | x-api-key | Yes | Your developer API key. |
| Header | Authorization | Yes | Bearer <refresh_token>. Use the refresh token here, not an access token. |
Response
{
"status": "Success",
"message": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6..."
}
}
| Field | Type | Meaning |
|---|---|---|
| status | string | Success or Error. |
| message.access_token | string | A 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.
Request
- Base URLhttps://api.developer.atomberg-iot.com/v2
- AuthAPI key in header x-api-key
Headers
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
Example response
{
"status": "Success"
}Changes
- info
endpoint added
- info