---
title: "Generate OAuth access token"
method: POST
path: "/oauth/token"
tags: ["oauth"]
---

# Generate OAuth access token

`POST /oauth/token`

Generate an OAuth access token by using an authorization code or a refresh token.

IMPORTANT: You need to start the OAuth flow via www.pinterest.com/oauth before calling this endpoint (or have an existing refresh token).

See <a href='/docs/getting-started/authentication/'>Authentication</a> for more.

## Response `200`

response

- OauthAccessTokenResponse — A successful OAuth access token response.
  - `response_type` 'authorization_code' | 'refresh_token'
  - `access_token` string, required
  - `token_type` string, required
  - `expires_in` integer, required
  - `scope` string, required

## Other responses

- `default` — Unexpected error

## Changes

- **2023-02-14** (v5) `be19b77aa78a` — 1 info
  - added `integration_refresh` mapping keys to the response discriminator for the response status `200`
- **2022-09-07** (v5) `bd20b6eb152f` — 1 info
  - the endpoint scheme security `basic` was added to the API

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

---

[API](https://skmtc.dev/pinterest/apis/pinterest-rest-api.md) · [All operations](https://skmtc.dev/pinterest/apis/pinterest-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pinterest/pinterest-rest-api/revisions/0ff12596bafd/schema)
