---
title: "Get Token"
method: POST
path: "/token"
tags: ["authentication"]
---

# Get Token

`POST /token`

## Request

- Base URL: `https://api.sb.ecobee.com/api/v2`
- URL: `https://api.sb.ecobee.com/api/v2/token`
- Auth: none required

Get JWT used to make all authenticated requests on behalf of a SmartBuildings account

## Request body

- AuthRequestBody
  - `audience` 'https://api.sb.ecobee.com', required
  - `client_id` string, required
  - `client_secret` string, password, required
  - `grant_type` 'client_credentials', required
  - `scope` string: An optional list of scopes, used to check if the client has been granted permissions to.

## Response `200`

Success

- AuthResponseBody
  - `access_token` string
  - `token_type` 'Bearer'
  - `expires_in` integer
  - `scope` string

## Other responses

- `400`: Bad Request
- `401`: Not Authenticated
- `429`: Token rate limit exceeded; please try again later
- `500`: Internal server error
- `default`: Unexpected error

---

[API](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api.md) - [All operations](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/revisions/d78d4fd5e1c6?raw)
