Hi,
I am unable to use the projects.locations.productSets.create method via the API Explorer. I receive the following http response:
{
"error": {
"code": 403,
"message": "Permission denied.",
"status": "PERMISSION_DENIED"
}
}
Here is the associated CURL command:
curl --request POST \
'https://vision.googleapis.com/v1/projects/my-project-id/locations/europe-west1/productSets' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"displayName":"testnamedisplay"}' \
--compressed
For authentication, I have tried using Google OAuth 2.0, an API Key, and both together. Each attempt led to the same 403 error.
Regarding the account I’m using, it has the following IAM roles for the specified project (my-project-id) :
AI Platform Admin
Owner
VisionAI Admin
VisionAI Editor
The VisionAI API is properly enabled. For example, I receive a 200 response when using the images.annotate method.
I have also tried other regions, such as us-west1, but I get the same result.
Is there a way to identify the root cause of this authentication error? If not, has anyone encountered this issue and could offer suggestions to help resolve it?
Thanks a lot for your help !
Hi @timdev75017,
Welcome to the Google Cloud Community!
The error that you encountered is a 403 "Permission Denied" issue when using the projects.locations.productSets.create method of the Google Cloud Vision API.
Here are the potential ways that might help with your use case:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi @MarvinLlamas ,
Thanks a lot for your answer.
My guess is that I missed a necessary permission as you suggest, maybe something about storage. Where can I find a list of required permissions ?
Thanks
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |