Exchange an authorization code or refresh token
curl --request POST \
--url https://api.webstashai.com/oauth/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'code=<string>' \
--data 'redirect_uri=<string>' \
--data 'client_id=<string>' \
--data 'code_verifier=<string>' \
--data 'refresh_token=<string>'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
code: '<string>',
redirect_uri: '<string>',
client_id: '<string>',
code_verifier: '<string>',
refresh_token: '<string>'
})
};
fetch('https://api.webstashai.com/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webstashai.com/oauth/token"
payload = {
"code": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"code_verifier": "<string>",
"refresh_token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "bearer",
"expires_in": 123
}{
"error": "<string>"
}Exchange an authorization code or refresh token
POST
https://api.webstashai.com
/
oauth
/
token
Exchange an authorization code or refresh token
curl --request POST \
--url https://api.webstashai.com/oauth/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'code=<string>' \
--data 'redirect_uri=<string>' \
--data 'client_id=<string>' \
--data 'code_verifier=<string>' \
--data 'refresh_token=<string>'const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
code: '<string>',
redirect_uri: '<string>',
client_id: '<string>',
code_verifier: '<string>',
refresh_token: '<string>'
})
};
fetch('https://api.webstashai.com/oauth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webstashai.com/oauth/token"
payload = {
"code": "<string>",
"redirect_uri": "<string>",
"client_id": "<string>",
"code_verifier": "<string>",
"refresh_token": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text){
"access_token": "<string>",
"refresh_token": "<string>",
"token_type": "bearer",
"expires_in": 123
}{
"error": "<string>"
}Authorizations
Body
application/x-www-form-urlencoded
