Unknown API key when trying to use the HTTP API directly
I am trying to create an archive from node.js, and I need to pass the allow_missing parameter, because I might have invalid public ids in the list.
I have been told that this has not been implemented in the node.js package, and therefore I am attempting to call the endpoint directly.
I am trying to package 1000 (the limit) files into a zip, and so I cannot use a GET request, but need to use a POST request. I have been told previously, that this is possible.
In the documentation it states that I should do basic auth with my api key and api secret in order to authenticate. I have done this, encoded these strings and has made an Authorization header. However, I keep getting the response "unknown API key". I have tried creating the Authorization key with Postman, so I am fairly confident that it is the correct key.
My questions are:
1) How should I provide the credentials for this to work
2) I am not sure how to provide the parameters (allow_missing, public_ids, etc). Can I use e.g. JSON as a HTTP body, or must I provide them in another way?
Thanks in advance!
Signature is the hash of timestamp, transformation and API secret.
These articles explain in detail how to generate the signature:-
In order to send the request directly to the endpoint, you should create a signature, rather than passing an authorisation header (basic auth is for the Admin API).
So, you can do something like this -
curl -g -X POST 'https://api.cloudinary.com/v1_1/<cloud_name>/<resource_type>/generate_archive?public_ids=<public_id>&public_ids=<public_id>&allow_missing=1&api_key=<api_key>&signature=<signature>×tamp=<ts>'
In order to investigate this further, please use the following form - https://support.publit.io/hc/en-us/requests/new - to create a direct ticket with us and share the code you are currently using to generate the signature and the parameters you're passing. We can then take a look and advise on what changes can be made to resolve it.
Post is closed for comments.