I have excel xls files in GCS which I am trying to convert to csv using cloudconvert API. As such I am using the job builder in v2 API to create the necessary curl for extracting file from GCS, transformation and upload. I have provided the required key, service account, permission to the service account and project details. Issue is whenever I use the curl formed from CLI I receive the following error -
{"message":"Unauthenticated.","code":"UNAUTHENTICATED"}
Request sample:
curl -X POST "https://api.cloudconvert.com/v2/jobs" \
-H "Authorization: Bearer API_KEY" \
-H "Content-type: application/json" \
-d '{
"tasks": {
"import-1": {
"operation": "import/google-cloud-storage",
"project_id": "sxxxxxx",
"bucket": "testxxxxxx",
"client_email": "[email protected]",
"file": "testconvert.xls",
"private_key": "-----BEGIN PRIVATE KEY-----\nMII--xxxxx--kQzfSa\n-----END PRIVATE KEY-----\n"
}
}
}'
Any pointers to what could be wrong is appreciated. I could not find reference to the error to provide a solution anywhere
According to CloudConvert API document:
When creating an API key, make sure the following scopes are at least checked:
From your provided sample requests, it looks like you provided the complete details except the Authorization header.
Your Auth header should then look like this: