apache gmail gmail-api javascript python

Invalid scope error when trying to access gmail api

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://]} 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:

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??