issue in running Google Vision API using BP Tool

#1
Hi Folks,

While running detect faces API of Google in blue prism,getting below error.

Internal : Unexpected error Failed to get OAuth2.0 Access Token : "ProtocolError" "{
"error": "invalid_grant",
"error_description": "Invalid issuer: Not a service account."
}"

please, Will anyone help me out in given error?
 
#4
@kattapug - now its working for me.

So, First create service account in Google Vision API as documented in Digital assets.(Please be prepare to add credit card details as it asks while making service account in Google and it will deduct Rs2, I guess for me :))
Second, Creating credential at Credential manager was little different here and my issue was due to this only.
So, OAuth 2.0 (JWT Bearer Token)" must be selected as a "Type" while creating credential.(normally we have general selected in credential manager) and and will be named "GoogleJWT".
Password - Take Generated key in notepad and
When copy and pasting in the private key, you must include the following information in the key then save in the credential manager

• -----BEGIN PRIVATE KEY-----\n

• \n-----END PRIVATE KEY-----\n
 
#5
Hi Sanjiv,

Thanks for your response.

I have followed your instruction and get another error now.

With quotation marks it get this error.

"-----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n"

Internal : Unexpected error PKCS8 data must be contained within '-----BEGIN PRIVATE KEY-----' and '-----END PRIVATE KEY-----'.
Parameter name: privateKey

Without quotation marks it get this error.

-----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n

Internal : Unexpected error Failed to get OAuth2.0 Access Token : "ProtocolError" "{
"error": "invalid_grant",
"error_description": "Invalid issuer: Not a service account."
}"

Any advise?
 
#6
HI kattapug,

sorry, i forgot to mention issuer which is the email listed IAM Section of Google Cloud Platform -> Service Accounts.

Second, don't use double quotes for credential " ".

In Key i used = , please check once by keeping it and again removing it.
for e.g. -----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n
-----BEGIN PRIVATE KEY-----\n privateKey =\n-----END PRIVATE KEY-----\n
Check both the way but first keep -----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n (recommended).

Be sure that you have created the service accounts as mentioned in document.

Please refer to attached file

Verify and let me know :)
 

Attachments

#8
HI kattapug,

sorry, i forgot to mention issuer which is the email listed IAM Section of Google Cloud Platform -> Service Accounts.

Second, don't use double quotes for credential " ".

In Key i used = , please check once by keeping it and again removing it.
for e.g. -----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n
-----BEGIN PRIVATE KEY-----\n privateKey =\n-----END PRIVATE KEY-----\n
Check both the way but first keep -----BEGIN PRIVATE KEY-----\n privateKey \n-----END PRIVATE KEY-----\n (recommended).

Be sure that you have created the service accounts as mentioned in document.

Please refer to attached file

Verify and let me know :)
Hey Could you help me please
I have wrotten correclty everything on the OAuth2.0
Im trying to use the API with twitter I already have the keys and all but this error is showing up (image 1), I think its involved with the Keys because i found this information Image 2
 

Attachments

#9
@luke.ruben , attachment error seems that you did not created key before making credential in System.
Steps to Create key in Blue prism
Go to system - security - Encryptions Scheme - New.
 
Top