AuthenticatorBuilder.subject() does not work #487
Replies: 2 comments 2 replies
-
I think the answer might be this part:
The library pre-sets authorization scopes based on the API description, and that can often be wrong due to incorrect heuristics. If you set the scopes by hand, this might work. Otherwise, the code is just one big file and can be inspected to see exactly how it's happening. |
Beta Was this translation helpful? Give feedback.
2 replies
-
@Byron Yes, it works! Thank you very much, you helped me a lot! let scopes = [
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/cloud-platform"
];
let result = hub
.spreadsheets()
.values_get(gspread_id, gspread_range)
.major_dimension("ROWS")
.value_render_option("UNFORMATTED_VALUE")
.add_scopes(scopes)
.doit()
.await? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Domain-wide delegation is enabled for the organisation in the Google Admin console, but a cant use AuthenticatorBuilder.subject(), i get an error -
Error(GoogleApiError(MissingToken(AuthError(AuthError { error: UnauthorizedClient, error_description: Some("Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."), error_uri: None }))))
.I'm sure there are no problems with the access settings, because similar code in Python works.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions