Cloudinary allows you to list all of your existing folders and subfolders via the Admin-API.
For example, for listing all root folders, send an HTTP GET request to the following URL:
https://api.cloudinary.com/v1_1/<your_cloud_name>/folders
Or, listing all folders within a subfolder:
https://api.cloudinary.com/v1_1/<your_cloud_name>/folders/<subfolder>
Note that requests must first be signed with your credentials, as described in our Admin-API documentation.
Our client libraries provide helper methods to simplify the request, e.g. (PHP):
$api = new \Cloudinary\Api();
$api->root_folders();
$api->subfolders("my_folder");
Comments
2 comments
So, I'm trying to test this using the direct API as per the example above.
For the signature hash, since there are no other parameters:
timestamp=1529697857abcd (abcd is the api_secret value)
I generate the hash and add it to call
https://api.cloudinary.com/v1_1/my_cloud_name/folders?api_key=1234×tamp=1529697857&signature=4b569a0f8322b3a285296b3b8c2908c2a1cb1937
A dialog pops up "Authentication Required" / User Name: / Password: / OK
Clear the dialog and JSON return says:
{"error":{"message":"Invalid credentials"}}
What am I missing?
Hi Michael,
What was the Username/Password you provided in the dialog box? Username here should be the API key and password should be the API secret.
Thanks,
Aditi
Please sign in to leave a comment.