Error uploading file: Unknown API key **** with postman
Hi guys!
I have the MERN app. In Express I have a /uploads endpoint for upload the files. When run the project in local and run the endpoint in postman no problem.
http://localhost:9000/upload
Response: File uploaded successfully. URL: https://res.cloudinary.com/+++++/image/upload/v1722958566/uploads/usxjvbjh1ro9jk6synk8.pdf
Hoewer, this projecto is deploy in heroku is a problem, because the postman response is:
Error uploading file: Unknown API key '+++++'
Who is the problem?
I was review the env, and it is OK. No problem with the variables.
Thanks!!!
Comments
-
Hi! I'm sure the varibles is good and redeploy this. But, I don't get upload de PDF with postman. Error Error uploading file: Unknown API key '+++++'. do I need the permsion in my account?
0 -
Hi Guys!
RESOLVEEEE!!!
I was resolve the problem. In my case, I was training upload the file with postman through the heroku endpoint. Well, the envoirment must only:
http:// CLOUDINARY_URL=cloudinary://API_KEY:API_SECRET@CLOUD_NAME and the config is:
// Return "https" URLs by setting secure: truecloudinary.config({ secure: true});
This the config correct ok? Only this!!
0 -
No special permissions needed for using Cloudinary API endpoints.
Yes, the configuration seems correct.
Typically in the postman you will create an environment which has the cloud_name, api_secret and api_key as shown in the screenshot and you will chose the environment when you run the end point.
Thanks,
Sree
0