无法刷新贝宝的访问令牌

问题描述

我使用此网址获得无效的刷新令牌 https://api-m.sandBox.paypal.com/v1/identity/openidconnect/tokenservice?grant_type=refresh_token&refresh_token=A21AAINhl7...._p4r5fZe1LJw

我的参数:

grant_type=refresh_token
refresh_token="A21AAINhl7...._p4r5fZe1LJw"

标题

Content-Type=application/x-www-form-urlencoded

basic auth 
clientid
client secret

输出

{
"error_description": "Unable to refresh access token","error": "invalid_request","correlation_id": "c58cc1...b0c5a","information_link": "https://developer.paypal.com/docs/api/#errors"
}

或者如何使用 paypal api 获取刷新令牌?刷新令牌值是我在此 url 中设置的过期访问令牌,是吗?

解决方法

您从哪里获得访问令牌?这个问题没有给出任何上下文。

如果它来自 grant_type=client_credentials for API access ,只需请求一个新的。那些无法刷新。

否则,首先使用完整的请求/响应和 Connect with PayPal 按钮信息更新您的问题,了解您如何获取访问令牌。