1

AuthSub を使用して、Google Health からトークンをリクエストしようとしています。スコープが不良または欠落していると表示されます。再確認しましたが、スコープは私には良さそうです。スコープをカレンダーに置き換えてみましたが、そのエラーは発生しません。

これがコードスニペットです

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)
4

1 に答える 1