나는 AuthSub을 사용하여 Google Health에서 토큰을 요청하려고합니다. 범위가 잘못되었거나 누락되었다고합니다. 나는 두 번 확인했고 범위는 나에게 잘 어울려. 나는 범위를 달력으로 대체하려고 시도했지만 그 오류는 발생하지 않습니다. 여기 Google Health에서 AuthSub를 사용하려고 할 때 '범위가 잘못되었거나 누락되었습니다.'라는 오류가 있었습니까?
내가 구글 헬스에 익숙하지 않은 해요 코드next = 'http://localhost:8080/auth'
# h9 scope for development
#scope = 'https://www.google.com/health/feeds/'
scope = 'https://www.google.com/calendar/feeds/'
#scope = 'https://www.google.com/h9/feeds/'
url_format = 'https://www.google.com/accounts/AuthSubRequest?next=%s&scope=%s&secure=%d&session=%d'
auth_sub_url = url_format % (next, scope, 0, 1)
#auth_sub_url = service.GenerateAuthSubURL(next, scope, secure = secure, session = session)
self.response.out.write('<a href="%s">Authorize Access to Your Google Health Account</a>' % auth_sub_url)
나를 위해 작동합니다. 귀하의 코드가 생성 한 URL로 이동하면 어떤 계정을 사용할지 묻는 Google 페이지가 표시되고 "사이트 localhost가 아래 나열된 제품에 대한 귀하의 Google 계정에 대한 액세스를 요청하고 있습니다"라고 말합니다 \t Google 캘린더 " – Bemmu
아, 캘린더를 온전함 테스트로 사용하는 것 같습니다. 건강에 어떤 변화가 있는지 다시 확인하겠습니다. 네 "범위 매개 변수가 잘못되었거나 누락되었습니다." – Bemmu