Edit in GitHubLog an issue

Quick Start: cURL

Welcome to the Creative Cloud Libraries API!

In this Quick Start tutorial, we'll be walking you towards making your first API call via the cURL command-line tool. By the end you'll have constructed a command that looks like this:

Copied to your clipboard
1curl --location --request GET \
2 https://cc-libraries.adobe.io/api/v1/libraries \
3 -H 'x-api-key: <CLIENT_ID_HERE>' \
4 -H 'Authorization: Bearer <ACCESS_TOKEN_HERE>'

This API call will return information about the libraries you have stored in Libraries:

Copied to your clipboard
1{
2 "total_count": 2,
3 "libraries": [
4 /* Your libraries here */
5 ],
6 "_links": {}
7}

By starting with this basic cURL command, you'll have an idea of what's required to make GET requests to the Libraries API. From there, you can play with the command to make GET requests to different endpoints from the command line, or translate these concepts to your environment of choice, like Node.js or Python.

Technology Used

  • Command-line cURL

Prerequisites

Tutorials

Assets

  • At least one Library associated with your Adobe ID.
  • A terminal application for a UNIX-based system (like macOS, Linux, or Windows Subsystem for Linux)

Development Steps

Info Complete code for this plugin can be found on GitHub.

1. Create and run your cURL command

In our How to get your developer credentials tutorial, we showed you how to get your Client ID and user access token.

You can take both of those values and add them to their respective headers (-H) below. Don't include the angle brackets (< >) in your command:

Copied to your clipboard
1curl --location --request GET \
2 https://cc-libraries.adobe.io/api/v1/libraries \
3 -H 'x-api-key: <CLIENT_ID_HERE>' \
4 -H 'Authorization: Bearer <ACCESS_TOKEN_HERE>'

You're ready to make your first API call! Just paste this command into your terminal application and hit enter.

2. Get results

Since you've sent a GET request to the /libraries endpoint, you can probably guess that you're going to get back information about the libraries you have stored in Creative Cloud Libraries—and you're right!

The response will look something like this:

Copied to your clipboard
1{
2 "total_count": 2,
3 "libraries": [
4 /* Your libraries here */
5 ],
6 "_links": {}
7}

Always check the references for the full details on any request or response.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.