---
title: "Get JWT token to authenticate all requests."
method: POST
path: "/oauth/token"
---

# Get JWT token to authenticate all requests.

`POST /oauth/token`

Generates valid JWT token for grant_type, client_id, and client_secret, using the values you pass in the request body.  Configure expiration time and SDK keys (to which the token grants access) in Optimizely config.

## Request body

- TokenContext
  - `grant_type` string
  - `client_id` string
  - `client_secret` string

## Response `200`

Generates a valid token

## Other responses

- `401` — Unable to match credentials

## Changes

> 41 revisions in range; 13 could not be searched.

- **2020-03-05** `cb780f560047` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/optimizely/apis/optimizely-agent-api/changes/oauth/token/post.md)

---

[API](https://skmtc.dev/optimizely/apis/optimizely-agent-api.md) · [All operations](https://skmtc.dev/optimizely/apis/optimizely-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/optimizely/optimizely-agent-api/revisions/8aa6750d4b77/schema)
