0
votes

https://www.googleapis.com/auth/gmail.metadata

This is from https://developers.google.com/gmail/api/auth/scopes. There are a list of scopes for the Gmail API. I am trying to understand my universe a bit more. These URIs return their scope on a GET - for example, the one above returns "gmail.metadata".

Why do I need to have a URI?

1
Hey @williamohara! I am not sure I quite understand the question here. Would you mind providing more details? Moreover, please bear in mind that depending on the technology you plan on using, scopes might take a different format. - ale13
thats just it - why was the URI format taken for this one - over just a regular string. What is one expected to do with it other than check if it is there and either fulfill or deny the request? - if i see a URI i would expect to GET something from it - but it does nothing but return "gmail.metadata" and that information is already in the URI - williamohara

1 Answers

1
votes

Scopes are just identifiers to represent an area of data and what you can do with that data. They are strings and how they are designed is up to the data owner:

  • When designing them for your own APIs, start with meaningful short names as in this scopes article.

  • When working with third party APIs you have to take what you are given. Large providers such as Google often use logical URL identifiers as namespaces, to ensure no clashes between the many cloud services they provide. These are not meant to be used as physical URLs though.