-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
documentai: client authentication fails #4494
Comments
@codyoss can you please check this or mention someone who can confirm this bug or [recommend any solution? |
Hey @taalhach sorry you are having problems with authentication. My best guess is that you are pointing to a service account key that is no long active on your project. I tried to reproduce this with the sample code given and it work for me when I pointed to a valid service account with the correct permissions. |
@codyoss as you can see from screenshot it says it is an active key and i have generated more keys and tried with those but no luck.
does it have anything to do with gcp cli as i haven't installed it because client libraries can take care of auth by themselves ? |
finally after searching and spending a lot of time i found that was an issue of scopes when we pass credentials via file we need to add an extra
|
@codyoss thanks for simplifying this piece of code really appreciate that :) |
Client
DocumentAI
Go Environment
$ go version
o version go1.15.6 linux/amd64
Code
Expected behavior
Client should process document
Actual behavior
Screenshots
Additional context
I have created service account and using credential from that account and while creating role i have created Basic > Owner role to give full access for now but i tried with document AI user role also. Still no luck on the other hand I have tried pubsub client with same credentials and it works perfectly fine. Is there something that i am doing wrong or this is bug with documentai client ??
The text was updated successfully, but these errors were encountered: