You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for providing such a great crate! This is proving to be very useful for our team.
Second, in an attempt at implementing a basic call to the Gmail API for a specific message, we are using the messages_get function, which returns type UserMessageGetCall. The default scope of this type is Scope::AddonCurrentMessageReadonly, which equates to the Gmail scope of https://www.googleapis.com/auth/gmail.addons.current.message.readonly. However, the Gmail API documentation indicates that the required scope for simply reading a message is https://www.googleapis.com/auth/gmail.readonly, which is defined as Scope::Readonly.
I've gotten around this by adding the scope manually, but I would think that the default scope should be Scope::Readonly instead of Scope::AddonCurrentMessageReadonly?
Thanks!
The text was updated successfully, but these errors were encountered:
As the APIs are autogenerated, most of the information about which scopes to use comes from the API description. I think there are also heuristics which try to determine a scope based on method names, but I don't remember details.
That said, the generator also supports overrides on a per-API basis, which are specified as JSON and would allow to amend the existing declaration (see etc/api/youtube/v3/youtube-api_overrides.yaml as example). However, what's needed to change default scopes on a per-call basis might not be implemented yet, and contributions to make that possible would definitely be welcome.
In the meantime, setting the scope manually should do the trick.
Hi there!
First, thanks for providing such a great crate! This is proving to be very useful for our team.
Second, in an attempt at implementing a basic call to the Gmail API for a specific message, we are using the
messages_get
function, which returns typeUserMessageGetCall
. The default scope of this type isScope::AddonCurrentMessageReadonly
, which equates to the Gmail scope ofhttps://www.googleapis.com/auth/gmail.addons.current.message.readonly
. However, the Gmail API documentation indicates that the required scope for simply reading a message ishttps://www.googleapis.com/auth/gmail.readonly
, which is defined asScope::Readonly
.I've gotten around this by adding the scope manually, but I would think that the default scope should be
Scope::Readonly
instead ofScope::AddonCurrentMessageReadonly
?Thanks!
The text was updated successfully, but these errors were encountered: