2
votes

I'm trying to use Gmail API for my web app. What I want is get messages which has attachment file and I'm following this tutoral.

The problem is when I use 'q' parameter, it return the error: Metadata scope does not support 'q' parameter

My request URL

Note: My authorize scopes are:

1

1 Answers

3
votes

The error message occurs when https://www.googleapis.com/auth/gmail.metadata is included in the scopes. But in your scopes, it is not used. So please confirm the following points again.

  • If the refresh token is retrieved in your script, please remove it and authorize again using the scopes without https://www.googleapis.com/auth/gmail.metadata.
  • If you use Google APIs Explorer, please remove Google APIs Explorer at https://myaccount.google.com/permissions.
    • Please login and remove it.

After you did above, please use the API of endpoint by authorizing using the scopes without https://www.googleapis.com/auth/gmail.metadata.

If this was not useful for you, I'm sorry.