---
title: "Request oauth2 access token"
method: POST
path: "/zephr/oauth2/token"
tags: ["Oauth2 Access Token"]
---

# Request oauth2 access token

`POST /zephr/oauth2/token`

## Request

- Base URL: `https://demo-site`
- URL: `https://demo-site/zephr/oauth2/token`
- Auth: one of:
  - API key in cookie `blaize_session`
  - API key in query parameter `jwt`
  - API key in header `x-blaize-jwt`
  - API key in header `x-zephr-jwt`
  - HTTP bearer
  - API key in cookie `blaize_jwt`

Facilitates the acquisition of an OAuth2 access token.  It requires either a basic authorization header or a client_id provided in the request body.

## Query parameters

- `client_id` string

## Headers

- `authorization` string

## Response `200`

OK

- Oauth2TokenResponse
  - `access_token` string: Oauth2 access token
  - `token_type` string
  - `expires_in` number: Oauth2 token expiry time in seconds
  - `refresh_token` string: Oauth2 refresh token to reuest a new Oauth2 token
  - `user_id` string: Authenticated user ID

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/zuora/apis/zuora-2.md) - [All operations](https://skmtc.dev/zuora/apis/zuora-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zuora/apis/zuora-2/revisions/678190d04c40?raw)
