---
title: "Get user access token"
method: GET
path: "/auth/{userId}/token"
tags: ["Access control"]
---

# Get user access token

`GET /auth/{userId}/token`

## Request

- Base URL: `https://connect.clever.gy`
- URL: `https://connect.clever.gy/auth/{userId}/token`
- Auth: API key in header `clevergy-api-key`

Returns user jwt based on the email. The jwt can be used in some endpoints
of the API to obtain energy data from the user.

## Path parameters

- `userId` string, required

## Response `200`

User jwt

- AuthUser
  - `jwt` string
  - `userId` string

## Other responses

- `401`: Unauthorized
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/clevergy/apis/clevergy-connect-api.md) - [All operations](https://skmtc.dev/clevergy/apis/clevergy-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clevergy/apis/clevergy-connect-api/revisions/d333c5eecb5b?raw)
