-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per-request AddCredential not working with BatchRequest #2065
Comments
Just did a test, using Now I think of it, Previously credential was provided by me on the client level so it worked. Now the client no longer has a credential. But I do not see an |
Per call credential is not currently supported for batch (by the library) as far as I can see. I'll take a closer look tomorrow and confirm. I'll also confirm what would be the fasted way to support it, whether to support it at the |
We crossed comments. It can be implemented either way, as individual batched requests may have their own credential. But possibly implementing at the All of this is pending confirmation when I've taken a closer look. In the meantime if you can use non-batch requests as a workaround that would allow your app to work. |
You're so fast. I barely finished my follow up comment :) I'm not familiar on the internals of the Google API batch mechanism. I'd imagine the Yes for now, the |
All requests in a batch are grouped together by the library and send as part of the content of a single request, the batch request. Headers on individual requests override headers in the batch request and this applies to the Authorization header as well. This applies to most REST Google APIS, and to Gmail in particular:
I still need to take a closer look at the library and which is easier/faster/cleaner to support. I'll report back here when I know more, but just to set expectations, that probably won't be until next week. |
@amanda-tarafa Thanks for the clarification. That makes sense. Either approach you mentioned would work for our use case. Thanks again! |
Just an update, this is still something I'll be working on soon, but I haven't yet the change to get to it. |
@amanda-tarafa By any chance this request can receive some love? :) |
@mikequ-taggysoft: Amanda is currently on vacation, and when she's back there are higher priorities. We haven't forgotten about this and will get to it, but I'm afraid we do need to prioritize work that will affect more customers. |
@mikequ-taggysoft Yes, this is still on my radar, but as @jskeet said some higher priority work popped up. We'll work on this for sure. |
With the per-request credential example provided by @amanda-tarafa in #2064, I was able to get it working for services like Calendar and Oauth2. But I'm having trouble with
GmailService
.I use
GmailService
viaBatchRequest
, like thisI'm getting error:
The text was updated successfully, but these errors were encountered: