Revoke paypal access token

89 Views Asked by At

I using Login with Paypal functionality. I then get a token that looks like this

{
"scope": "https://uri.paypal.com/services/invoicing",
"access_token": "<MY_TOKEN>",
"token_type": "Bearer",
"expires_in": 28800,
"refresh_token": "<MY_REFRESH_TOKEN>",
"nonce": "2023-09-11T09:11:ABCCDEFG",
"state": "MY_STATE"
}

If I want to revoke the token i should be able to do something like this

curl --location 'https://api-m.paypal.com/v1/oauth2/token/terminate' \
-H "Authorization: Basic <BASE64_OF_clientID:clientSecret>" \
--data-urlencode 'token=<MY_TOKEN>' \
--data-urlencode 'token_type_hint=ACCESS_TOKEN'

But when I look into where the granted APIs are viewed in the Paypal dashboard it's still there. I expect it to be removed so that when I trigger the install again I will get the consent screen up again. Screenshot of the dashboard with the APIs Am I not calling the right revoking endpoint to revoke the token? Because I get no response back

0

There are 0 best solutions below