Me
Create an OAuth Token
Exchange a code for a token
POST
/
v5
/
oauth
/
token
Authorization
Body
curl --request POST \
--url https://api.whop.com/api/v5/oauth/token \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<string>",
"client_secret": "<string>",
"code": "<string>",
"grant_type": "authorization_code",
"redirect_uri": "<string>"
}'
{
"access_token": "<string>"
}
For more information about OAuth, follow our Webapp guide.
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
client_id
string
requiredThe client ID of your oAuth application.
client_secret
string
requiredThe client secret of your oAuth application.
code
string
requiredThe authorization code
grant_type
enum<string>
requiredThe grant type
Available options:
authorization_code
redirect_uri
string
requiredThe redirect URI
Response
201 - application/json
access_token
string
requiredThe access token of the user
Was this page helpful?
curl --request POST \
--url https://api.whop.com/api/v5/oauth/token \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<string>",
"client_secret": "<string>",
"code": "<string>",
"grant_type": "authorization_code",
"redirect_uri": "<string>"
}'
{
"access_token": "<string>"
}