呼叫garmin Oauth access_token

时间:2019-02-07 13:40:57

标签: java android oauth garmin

已发送授权标头是下面提供的模式,仍然出现授权错误 尝试排球和改造都使用GET / POST 遵循garmin门户网站中给出的说明仍无法正常工作

我要发布的内容的示例格式

授权:oauth_verifier =“ wvDJQmLSwY”,oauth_version =“ 1.0”,oauth_consumer_key =“ cb60d7f5-4173-7bcd-ae02-e5a52a6940ac”,oauth_token =“ 760d85bd-b86e-4da6-b58b-ba57a542_23st”, ,oauth_nonce =“ 2lRbgVyTAgh”,oauth_signature_method =“ HMAC-SHA1”,oauth_signature =“ zSAEERG2NNoQaVjVthJ5xP4XcCM%3D”

HttpUrl url = originalHttpUrl.newBuilder()
.addQueryParameter("oauth_verifier", oauth_verifier)
.addQueryParameter(OAUTH_VERSION, OAUTH_VERSION_VALUE)
.addQueryParameter(OAUTH_CONSUMER_KEY, consumerKey)
.addQueryParameter("oauth_token", oauth_token)
.addQueryParameter(OAUTH_TIMESTAMP, timestamp)
.addQueryParameter(OAUTH_NONCE, nonce)
.addQueryParameter(OAUTH_SIGNATURE_METHOD, OAUTH_SIGNATURE_METHOD_VALUE)
.addQueryParameter(OAUTH_SIGNATURE, signature)
.build();
Request.Builder requestBuilder = original.newBuilder()
.url(url);
Request request = requestBuilder.build();
return chain.proceed(request);

在request_token api的情况下,我会按照以下步骤获得正确的响应,但在access_token情况下,我不是

0 个答案:

没有答案