我正在尝试从Paypal处获取请求,以创建一个基于产品/订阅的平台。首先,我使用curl获得了访问令牌:
https://developer.paypal.com/docs/api/get-an-access-token-curl/
curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "CLIENTID:SECRETID" \
-d "grant_type=client_credentials"
(出于保密目的,我只是拿出我的ID)
现在我去创建产品
https://developer.paypal.com/docs/api/catalog-products/v1/#products_create
运行命令后,我得到。
{
"name":"NOT_AUTHORIZED",
"message":"Authorization failed due to insufficient permissions.",
"debug_id":"2a8285dd8feeb",
"details":
[{"issue":"PERMISSION_DENIED",
"description":
"You do not have permission to access or perform operations on this resource."}],
"links":[{"href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#NOT_AUTHORIZED","rel":"information_link","method":"GET"}]
}
我的问题是我是否必须等待PayPal支持才能授予我的帐户授权,或者我自己可以解决这个问题?