Error uploading file: Unknown API key **** with postman

byeveweb
byeveweb Member Posts: 3
edited August 14 in Developer APIs

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!!!

Tagged:

Comments

  • johnr
    johnr Member Posts: 14

    Hi @byeveweb,

    After making sure that all necessary variables are correct, you may need to redeploy your code after adding the Cloudinary config variables in Heroku.

    Please let me know of this helps resolve the issue.

    Best,

    John

  • byeveweb
    byeveweb Member Posts: 3

    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?

  • byeveweb
    byeveweb Member Posts: 3

    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!!

  • SreeCloudinary
    SreeCloudinary Member, Cloudinary Staff Posts: 44

    @byeveweb ,

    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