0

According to the documentation: https://developers.google.com/admin-sdk/alertcenter/reference/rest/v1beta1/TopLevel/getSettings#authorization-scopes

And Also the discovery Documents: https://alertcenter.googleapis.com/$discovery/rest?version=v1beta1

The scope for "Alert Center API" is https://www.googleapis.com/auth/apps.alerts

However, when I use this scope, I get the error message:

Authorization Error
Error 400: invalid_scope
Some requested scopes cannot be shown: [https://www.googleapis.com/auth/apps.alerts]

Did the scope change and the documentation is outdated? Any other options to access this API?

miturbe
  • 715
  • 4
  • 17
  • Hi ! Could you please share a sample code with no senstive data that I can reproduce to obtain that error message ? Thanks ! :D – Mateo Randwolf Oct 27 '20 at 09:55
  • Hi @mateorandwolf, I tested the scope in google path playground. I haven't written code yet. https://developers.google.com/oauthplayground/. The scope is not in the list but you can add it at the end of the list in a text field – miturbe Oct 27 '20 at 12:10

1 Answers1

0

This response is happening because you are not using the scope with a service account. As described by this piece of documentation:

Your project must use a service account when accessing the API.

Therefore, if you access this API with a service account you will be able to interface it correctly, otherwise, you won't. More about service account authorization here.

Also, note that the scope is in the list under G Suite Alert Center API v1beta1.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mateo Randwolf
  • 2,823
  • 1
  • 6
  • 17