0
我試圖訪問contacts.readonly
範圍,同時在Google Developers Console的項目API中啓用了Contacts API。Google Contacts API - 只讀訪問
$ export client_id='**********************************************.apps.googleusercontent.com'
$ export scope='https://www.googleapis.com/auth/contacts.readonly'
$ curl -d "client_id=${client_id}&scope=${scope}" https://accounts.google.com/o/oauth2/device/code
{
"error" : "invalid_scope",
"error_description" : "Not authorized to request the scopes: [https://www.googleapis.com/auth/contacts.readonly]",
"error_uri" : "http://code.google.com/apis/accounts/docs/OAuth2.html"
}
當我改變的範圍讀寫,這個工程:
$ export scope='https://www.google.com/m8/feeds'
$ curl -d "client_id=${client_id}&scope=${scope}" https://accounts.google.com/o/oauth2/device/code
{
"device_code" : "*********************************************",
"user_code" : "********",
"verification_url" : "https://www.google.com/device",
"expires_in" : 1800,
"interval" : 5
}
添加在控制檯Google+的API並沒有幫助的。
謝謝你,會做到這一點。 – 2014-11-04 09:22:32
https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3659 – 2014-11-04 09:27:24