3

I am following the instruction on how to get an access token from Paypal using Postman.

I keep on getting this error message:

"error": "unsupported_grant_type", "error_description": "Grant Type is NULL"

Here is my postman setting:

Url: https://api.sandbox.paypal.com/v1/oauth2/token

Authrization: Username: client_id... Password: secret...

Header: Content-Type -> application/x-www-form-urlencoded

body: form-urlencoded

key: grant_type
value: client_credentials
leogoesger
  • 3,476
  • 5
  • 33
  • 71

3 Answers3

8

Follow the screenshots. I guess your problem in flow when you insert grant_type in body.

Choose "Basic auth" type

Add body content

Art Olshansky
  • 3,032
  • 1
  • 19
  • 25
0

check the structure of the body, like below.

body: {
    mode: 'urlencoded',
    urlencoded: [
    {key: "grant_type", value: "openapi_2lo", disabled: false},
]
Manu Gr
  • 11
  • 1
0

If someone is using Insomnia, here are the settings

enter image description here

enter image description here

Add username as client-id and password as secret

Use Basic Auth to setup username and password

Enter username as client-id and password as secret

Rohit Gupta
  • 2,571
  • 3
  • 16
  • 25