---
title: "Poll for access token"
method: POST
path: "/auth/device/token"
tags: ["Authentication"]
---

# Poll for access token

`POST /auth/device/token`

Poll for access token after user completes authentication in browser. Call this repeatedly until success or error.

## Request body

- InternalHttpapiUsersapiDeviceTokenRequest
  - `device_code` string — DeviceCode from the initial device code response

## Response `200`

OK

- InternalHttpapiUsersapiDeviceTokenResponse — Token response after successful device authentication
  - `access_token` string — AccessToken is the JWT access token
  - `expires_in` integer — ExpiresIn is the lifetime of the access token in seconds
  - `refresh_token` string — RefreshToken for obtaining new access tokens (if offline_access scope was granted)
  - `token_type` string — TokenType is always "Bearer"

## Other responses

- `400` — authorization_pending, slow_down, expired_token, or access_denied
- `500` — Internal Server Error
- `503` — Device flow not configured

---

[API](https://skmtc.net/deeplake/apis/deeplake-api.md) · [All operations](https://skmtc.net/deeplake/apis/deeplake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deeplake/deeplake-api/revisions/e16ed11d991c/schema)
