These docs are for v2. Click to read the latest docs for v3.

Exchange code for a Token

This is the flow that Web Apps with a backend server use to access an API. Use this endpoint to exchange an Authorization Code for a Token.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
enum
required

Denotes the flow you are using. For Authorization Code, use authorization_code.

Allowed:
string
required

The client ID you received from Lifen when you registered your OAuth App.

string
required

The client Secret you received from Lifen when you registered your OAuth App ⚠️warning : only use client_secret from your backend. If you have to exchange the authorization code by an access token in frontend (Single Page App or Native App), you can do it by using Authorization Code flow with Proof Key for Code Exchange (PKCE).

string
required

The value must match the redirect_uri passed to /authorize. Note that this parameter must be URL encoded.

string
required

The Authorization Code received from the initial /authorize call.

Response

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