---
title: "Get access tokens"
method: POST
path: "/v2/oauth/access_token"
tags: ["oauth"]
---

# Get access tokens

`POST /v2/oauth/access_token`

This endpoint returns an access token for the specified user and with the specified scopes. The token does not expire until the user changes their password. The body parameters must be encoded as form data.

## Request body

- object
  - `client_id` string, required — Client ID (Consumer Key) of your application
  - `client_secret` string — Client Secret (Consumer Secret) of your application
  - `code` string — Response code from the /oauth/authorize flow; required if grant_type=authorization_code
  - `grant_type` 'authorization_code' | 'client_credentials' | 'refresh_token', required — Grant type: authorization_code generates user tokens, client_credentials generates short-lived client grants
  - `realm` 'customer' | 'contributor' — User type to be authorized (usually 'customer')
  - `expires` boolean — Whether or not the token expires, expiring tokens come with a refresh_token to renew the access_token
  - `refresh_token` string — Pass this along with grant_type=refresh_token to get a fresh access token

## Response `200`

OK

- object — Access token response to client apps
  - `access_token` string, required — Access token that can be used for future requests
  - `expires_in` integer — Number of seconds before token expires, only present for expiring tokens
  - `token_type` string, required — Type of token
  - `refresh_token` string — A refresh token that can be used to renew the access_token when it expires, only present for expiring tokens
  - `user_token` string — Metadata about the access_token, only present for expiring tokens

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

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