在 Postman 中测试时,我需要在 headers 和 body 类型中输入哪些参数?
Which parameters I need to put in the headers and body type while testing in Postman?
curl -X POST https://api.sandbox.paypal.com/v1/oauth2/token \
-H 'Authorization: Basic {Your Base64-encoded ClientID:Secret}' \
-d 'grant_type=authorization_code&code={authorization_code}'
我正在尝试这个,但没有给我令牌输出。
我已经把 Authorization: Basic {Your Base64-encoded ClientID:Secret}
进入 Headers。
我做错了什么吗?
这是我在 Postman 中得到的输出。
{
"name": "AUTHENTICATION_FAILURE",
"message": "Authentication failed due to invalid authentication credentials or a missing Authorization header.",
"links": [
{
"href": "https://developer.paypal.com/docs/api/overview/#error",
"rel": "information_link"
}
]
}
看起来请求的操作应该是 post 并且在 postman 中它看起来像你放置了 get 操作。
添加授权,基本并给clientid作为用户名和密码作为secret
去掉自定义header basic,postman会自动添加basic authentication header
curl -X POST https://api.sandbox.paypal.com/v1/oauth2/token \
-H 'Authorization: Basic {Your Base64-encoded ClientID:Secret}' \
-d 'grant_type=authorization_code&code={authorization_code}'
我正在尝试这个,但没有给我令牌输出。
我已经把 Authorization: Basic {Your Base64-encoded ClientID:Secret}
进入 Headers。
我做错了什么吗?
这是我在 Postman 中得到的输出。
{
"name": "AUTHENTICATION_FAILURE",
"message": "Authentication failed due to invalid authentication credentials or a missing Authorization header.",
"links": [
{
"href": "https://developer.paypal.com/docs/api/overview/#error",
"rel": "information_link"
}
]
}
看起来请求的操作应该是 post 并且在 postman 中它看起来像你放置了 get 操作。
添加授权,基本并给clientid作为用户名和密码作为secret
去掉自定义header basic,postman会自动添加basic authentication header