3
400. That’s an error.

Error: invalid_scope

You don't have permission to access some scopes. Your project is trying to access scopes that need to go through the verification process. {invalid = [https:// mail.google.com/]} If you need to use one of these scopes, submit a verification request.

This is the error that I am getting when I flowed the tutorial in this link: https://developers.google.com/gmail/api/quickstart/js

In the link they asked me to access webserver via python but I am using apache. So in the step 1.f, Authorized JavaScript origins: am using the link http:// localhost instead of http:// localhost:8000. What might be causing the error??

deepak asai
  • 202
  • 1
  • 5
  • 17
  • have you submitted a verification request for `[https://mail.google.com/]` scope, like the error suggests you need to? – Jaromanda X Jun 05 '17 at 06:46
  • verification request is leading to link: https://support.google.com/code/contact/oauth_app_verification?id=783306915704&client=783306915704-s8c3vajfdlvjj21bu6qaqhos9c352j8g.apps.googleusercontent.com&query=https://www.googleapis.com/auth/gmail.readonly . But same when i tried with php it worked well.. Didnt asked for any verification.. But I want to implement in JS.. – deepak asai Jun 05 '17 at 06:56
  • Not sure if you got that, but it's a matter of google's API scope, as in the information you request from them. That means you do not have access to certain informations without asking for specific permissions, and has -allegedly- nothing to do with your code. – DrunkDevKek Jun 05 '17 at 07:06

1 Answers1

3

You may refer with this thread.

As per the announcement on May 11, 2017, publicly available applications with access to certain user data must pass review. If you see an access error for your app, submit a request using our OAuth Developer Verification form.

For personal-use apps and those you are testing, join the Google group Risky Access Permissions By Unreviewed Apps, which allows you to approve data access for personal and testing accounts. See the Google API Services User Data Policy for more information.

This blog about how to fix this error might be also helpful.

Community
  • 1
  • 1
abielita
  • 13,147
  • 2
  • 17
  • 59