我创建了一个新应用程序,并按照此处记录的 API 说明进行操作:https : //developer.paypal.com/docs/api/activities/
我的沙箱凭证很好,我用它们创建了一个不记名令牌,我用它(在 Postman 中)成功地发布了付款(https://api.sandbox.paypal.com/v1/payments/payment)。
但是,我对这个应用程序的目标是使用上面链接的 API 函数创建一个活动报告。为此,除了所有其他应用程序功能选项之外,我还打开了名为Transaction Search的适当“应用程序功能选项” 。
标题:
Authorization: Bearer (new bearer token here)
Run Code Online (Sandbox Code Playgroud)
我的 GET 请求:
https://api.sandbox.paypal.com/v1/activities/activities?start_time=2018-05-03T15:00:00.000Z&end_time=2018-05-02T15:30:00.000Z&page_size=10&next_page_token=1
Run Code Online (Sandbox Code Playgroud)
无论我做什么,我都会得到:
HTTP Status: 401 Unauthorized
Run Code Online (Sandbox Code Playgroud)
请求正文:
{
"name": "PERMISSION_DENIED",
"message": "No permission for the requested operation",
"details": {
"": "No permission for the requested operation"
}
}
Run Code Online (Sandbox Code Playgroud)
我是美国开发者,这个应用是我自己用的。