나는 보통 API 진입 점이 잘 작동하는지,이 문제가 : 다음구글 API를 알 수없는 인증 헤더를 제공
https://www.google.com/analytics/feeds/accounts/default?max-results=50
:
https://www.google.com/analytics/feeds/accounts/default
하지만 같은 매개 변수를 추가 할 때 실패합니다.
GET&https%3A%2F%2Fwww.google.com%2Fanalytics%2Ffeeds%2Faccounts%2Fdefault&oauth_consumer_key%3DCONSUMERKEY%26oauth_nonce%3D88526211463343710%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D44173%26oauth_token%3DCONSUMERTOKEN%26oauth_version%3D1.0
{ host: 'www.google.com',
path: '/analytics/feeds/accounts/default?max-results=25',
method: 'GET',
headers: { Authorization: 'OAuth oauth_token="CONSUMERTOKEN", oauth_timestamp="44173", oauth_nonce="88526211463343710", oauth_consumer_key="CONSUMERKEY", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature="S%2Bob3FyVFpwRsu4x7C%2FwmkwbnDY%3D"' } }
STATUS: 401
HEADERS: {"www-authenticate":"GoogleLogin realm=\"http://www.google.com/accounts/ClientLogin\", service=\"analytics\"","content-type":"text/html; charset=UTF-8","date":"Fri, 11 Nov 2011 20:42:56 GMT","expires":"Fri, 11 Nov 2011 20:42:56 GMT","cache-control":"private, max-age=0","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-xss-protection":"1; mode=block","server":"GSE","connection":"close"}
response: Unknown authorization header
이 여러 유사와 함께 여기 저기 여러 번 요청하고 있지만 지금까지 해결 근본적인 문제를 찾을 수 없습니다 ...
정확히 동일한 문제가 있습니다. 매우 실망 스럽다. 저에게 문제는 PUT 요청과 함께 Google 캘린더 API에 있습니다. v = 2 또는 gsessionid 매개 변수를 url에 첨부 할 때만 발생합니다. – Melvin
아래 나의 대답을 참조하십시오. 기본 문자열과 게시 된 값은 정확히 일치해야합니다. 내 경우에는 문제가 적어도있었습니다. – MarkokraM