Get Access Token v4

OAuth 2.1 token endpoint. Either:

  1. Exchanges an authorization_code for an access_token, or
  2. Exchanges a refresh_token for an access_token.
    When exchanging a refresh_token for an access_token, also invalidates existing refresh_token and generates a new refresh_token.
    Access tokens expire after 1 hour. Refresh tokens expire after 90 days by default.
    See Refresh Tokens for how this works.

If /token or /token/v3 returns 400 TOKEN_V4_REQUIRED, your client must use this endpoint.

Errors use the OAuth 2.1 format with error and error_description.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Form Data
string
required

ID assigned by Yelp for the third-party system that will make user-authorized requests to Yelp.

string
required
length between 64 and 64

Client secret assigned by Yelp for the third-party system that will make user-authorized requests to Yelp.

string
enum
required

Value MUST be set to "authorization_code".

Allowed:
string
required

Authorization code that is sent back to the redirect uri after a user authorized the client's oauth client.

string

REQUIRED, if the "redirect_uri" parameter was included in the authorization request and their values MUST be identical.

string
length between 43 and 128
^[A-Za-z0-9\-._~]+$

PKCE code verifier (RFC 7636). The original random string used to generate the
codechallenge sent in the authorization request. Required when the authorization
request included a code_challenge. Must be between 43 and 128 characters,
using [A-Z] / [a-z] / [0-9] / "-" / "." / "
" / "~".

string
enum

The method used to derive the code_challenge from the code_verifier.
Only S256 is supported.

Allowed:
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json