I get error on oauth1 to oauth2 token migration: Requested scopes have not been previously approved..
Scopes
https ://docs.google.com/feeds/
https ://spreadsheets.google.com/feeds/
https ://docs.googleusercontent.com/
were authorized for oauth1 tokens and that was enough for GAMv1 to GAMv2 migration (target OAuth2 scope is https ://www.googleapis.com/auth/drive).
I tried to use api which is described in https://developers.google.com/accounts/docs/OAuth_ref
This is example of my request:
POST /o/oauth2/token HTTP/1.1 Authorization: OAuth realm="", oauth_signature="ZFA3Cx8Gxyz4YRmELO6uu2urOsM%3D", oauth_nonce="618148508599347", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="XXXXXX.apps.googleusercontent.com", oauth_token="YYYY", oauth_timestamp="1386762587" Content-Type: application/x-www-form-urlencoded Content-Length: 248 Host: accounts.google.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Amigration%3Aoauth1&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&client_id=TTTTTTT.apps.googleusercontent.com&client_secret=ZZZZZZZZZZZZZ
Also, other important question in my situtation: Is it possible to convert the following scopes: https ://www.googleapis.com/auth/userinfo.email and https ://www.googleapis.com/auth/userinfo.profile
if oauth1 token authorized for https ://docs.google.com/feeds/ only?
I am asking because in google apps marketplace configuration, for example, these scopes are default, and can't be removed. So it will be great to get these scopes after token migration.