I am trying to test the google vision api, I watched the postman video on YouTube of Arlemi and crew doing the exact API. I Forked the collection they recommended to my own as suggested.
I followed those steps to a degree as his was, I believe, pulling image from a URL(twitter) and my use case, is trying to pull from google storage buckets with gs source path and URi information.
I have a service account tied to the project where the cloud storage buckets are created. I have permissions set in IAM, API service account permission settings, & in the actual cloud storage bucket, i set all permissions to my actual account and to the service account in question.
I downloaded the JSON key from the service account to my local machine, set the GOOGLE_APPLICATION_CREDENTIALS to point to said downloaded JSON file, set and confirmed in PowerShell.
I set up Postman the way in the video with a secret api key setting in the Environment in Postman. I believe it works as without it, i get error along the lines of “Needs an API key to access” or something like that, when I put in the key, i no longer get that particular error instead get the 403 permission denied.
I am new to Postman and sadly new to doing APIs. I set my workspace to public. I have tried to research this permission denied error for a few days. Some articles say set permissions to Storage Object viewer and creator(i currently have that set). Some articles say No Permissions needed since API key is in action.
I have attempted to do OAuth 2.0 instead but sadly couldn’t figure out what was what so I went back to API key since I saw it working in a Video on the same API.
- Additional Data:
Blockquote{
“requests”: [
{
“inputConfig”: {
“gcsSource”: {
“uri”: “gs://{Gs-Bucket-Path}/{Folder Path & Exact File Path.pdf}”
},
“mimeType”: “application/pdf”
},
"outputConfig": {
"gcsDestination": {
"uri": "{gs:// output folder path}"
},
"batchSize": 1
},
"features": [
{
"type": "TEXT_DETECTION"
}
]
}
]
}
{
“error”: {
“code”: 403,
“message”: “Error opening file: gs:// /{Gs-Bucket-Path}/{Folder Path & Exact File Path.pdf}”,
“status”: “PERMISSION_DENIED”
}
}
Blockquote
- Platform Details: I’m using Postman desktop app v11.17.1. Windows 11.
I’m looking for help to learn because I feel like a API shouldn’t be this challenging.