google oauth - Gmail label request fails with http 403 (forbidden) -
i have application uses oauth 2 access gmail. working fine users. users, however, application fails @ point of trying read gmail labels, http error 403 (forbidden). keep in mind previous api call, have accessed user profile successfully. here call fails:
get /gmail/v1/users/user.name@domain.com/labels?access_token=ya29.fwi_zl1rf3xoiqchnzpbhmjvljhrpofkh4a9mvvwhyro6h09qx5rnkv76zkt7e6-sezr
i requesting following scopes when getting access token, , user has logged in google , accepted request access (and can see when @ security dashboard):
https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/userinfo.profile https://www.google.com/m8/feeds https://www.googleapis.com/auth/tasks https://www.googleapis.com/auth/gmail.labels https://mail.google.com/
note added gmail.labels scope in @ attempt fix this. again, code working fine users - why users fail label request?
use shorthand value me
instead of user.name@domain.com
, user access token
belongs used automatically.
Comments
Post a Comment