私はリフレッシュトークンからPaypalのアクセストークンを取得
POST /v1/oauth2/token HTTP/1.1
Host: api.sandbox.paypal.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic QVZZeWdRa2dSX3pScmtJT25PZXVz.....
Cache-Control: no-cache
grant_type=refresh_token&refresh_token=-Q1_6fEwUDQ0ci0CJIA......
RESULTに
REQUEST、cURLのか、成功した郵便配達取得応答を経てリフレッシュトークンからaccess_tokenは取得しようとすると
{
"scope":"phone https://uri.paypal.com/services/subscriptions https://api.paypal.com/v1/payments/.* address email https://api.paypal.com/v1/vault/credit-card https://uri.paypal.com/services/applications/webhooks https://uri.paypal.com/services/payments/futurepayments openid https://api.paypal.com/v1/vault/credit-card/.*","nonce":"2016-11-08T13:58:45Zm5eDiRGyJIDC9EwX7DRl6aB7IPlRl-cjoS_E3Ro8sCo",
"access_token":"A103.CfI6WQaDmEqrQ.....",
"token_type":"Bearer",
"app_id":"APP-80W28448....",
"expires_in":28796
}
しかし、私は、このようなPayPalのネットSDKで
var apiContext = PaypalConfiguration.GetAPIContext();
var tokenInfo = new Tokeninfo();
tokenInfo.refresh_token = "-Q1_6fEwUDQ0ci0CJIA7BtG_Ey4i....";
var refreshTokenParams = new CreateFromRefreshTokenParameters();
var token = tokenInfo.CreateFromRefreshToken(apiContext, refreshTokenParams);
を同じことを行うとき、私はこの応答を得続けるが、
{
"error_description":"POST /v1/oauth2/token returned a response status of 400 Bad Request",
"error":"400",
"correlation_id":"46ecefc761f3f",
"information_link":"https://developer.paypal.com/docs/api/#errors"
}
私のモードは、サンドボックス、クライアントIDとクライアントシークレットとして設定されている権利ですサンドボックス用。
私はどこが間違っているのか教えてください。Paypal-NET-SDKと間違っていますか?