Edit in GitHubLog an issue

Licensing reference

The Stock API provides the following methods related to licensing and getting more info about licensed assets. For a guide to usage and additional examples, see Licensing Stock assets.

Content and Member requests

EndpointsMethod
GET
GET, POST (for adding license references)
GET
GET

Description of endpoints

  • Content/Info. Requests licensing information about a specific asset for a specific user or enterprise organization.
  • Content/License. Requests a license for an asset.
  • Member/Profile. Asks for the licensing capabilities for a specific user or organization. Call this before requesting an asset license so that you can display the user's existing quota or direct the user to the Adobe Stock site to purchase a plan or asset. This API returns the user's available purchase quota and information that you can use to present licensing options to the user when the user next requests an asset purchase. Depending on the user's quota and plan the following cases can occur:
    • User has enough quota to license the next asset. Display the returned message, which shows the user's current quota before purchasing.
    • User doesn't have enough quota but can handle overage (they have a saved purchase method on file). Display the returned message, which includes the price and asks the user to license the asset with overage.
    • User doesn't have quota and there is no overage plan. Display the returned message, which indicates that the user will be redirect to the Adobe Stock site to review plans.
  • Member/LicenseHistory. Requests a list of licenses and download URLs for every previously licensed asset. This is covered in the next section, License history reference.

Authentication

The Authorization header is required for any of the licensing calls. The API uses the header to determine the user's member number, licensing status, and default locale. See API authentication for more information.

Request headers

See Headers for Stock API calls for details about header content.

  • Required headers: x-Product, x-api-key, Authorization
  • Optional headers: X-Request-Id

URL parameters

Pass URL-encoded parameters with the GET request.

ParameterDescription
content_id
Asset's unique identifier. You can get this from a search response's id attribute. Integer.
license
Use with Content/Info, Content/License, and Member/Profile. The Adobe Stock licensing state for the asset. String. Valid values and meaning:
  • "" (empty string): No license applies
  • For standard/core photos, illustrations, and vectors (non-Premium):
    • Standard: License for the full-resolution image
    • Extended: Extended license for the full-resolution image
  • For video:
    • Video_HD: License for the HD-resolution video
    • Video_4K: License for the 4K-resolution video. Tip: Not all videos are available in 4K.
  • For vector assets: Standard or Extended
  • For 3D assets: Standard
  • For templates: Standard
  • For Premium:
    • Standard: License for the full-resolution image
    • Standard_M: License for a medium-size asset approximately 1600x1200 pixels.Tip: Not all Premium assets offer this license.
    • Extended: Extended license for the full-resolution image
  • Additional license values if Alternative Licenses are available:
    • Internal_Use
    • Video_HD_Internal_Use
    • Digital_Use
    • Video_HD_Digital_Use
    • Social_Media
    • Video_HD_Social_Media
    • Video_HD_Standard
locale
Use with Member/Profile and Member/LicenseHistory.

Optional. Location language code for the API to use when returning localized messages. The API can usually get the user's default locale through the Authorization header. This value overrides that or provides a locale if not available through Authorization. String.

Default is en_US. See the full list of Locales.

license_again
Use with Content/License. Optional. Used to re-license an asset, deducting licenses/credits as if it were a new transaction. Boolean.

Default is false, meaning that if Content/License is used on an asset that is already licensed, it will not trigger a new license. Using true overrides that behavior, and forces a new license event.

curl "https://stock.adobe.io/Rest/Libraries/1/Content/License?content_id=112670342&license=Standard&license_again=true" -H "x-api-key: YourApiKeyHere" -H "x-product: MySampleApp/1.0" -H "authorization: Bearer AccessTokenHere"

Responses

Calls return information in JSON structures.

Response JSON summaries

  • Content/Info returns this structure. Some attributes appear only in certain situations.
Copied to your clipboard
1{
2 "contents": {
3 "0000": {
4 "content_id": 0000,
5 "purchase_details": {
6 "stock_id": 12345, /*only if user has not purchased*/
7 "date": "yyyy-mm-dd hh:mm:mm", /*only if purchased*/
8 "license": "...", /*only if purchased*/
9 "state": "..."
10 },
11 "size": "..."
12 }
13 },
14 "member": {
15 "stock_id": 12345
16 }
17}
  • Content/License returns this structure. Some attributes appear only in certain situations.
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": n,
4 "license_type_id": x,
5 "has_credit_model": true||false,
6 "has_agency_model": true||false,
7 "is_cce": true||false,
8 "full_entitlement_quota": []
9 },
10 "contents": {
11 "0000": {
12 "content_id": 0000,
13 "purchase_details": {
14 "state": "...",
15 "license": "...",
16 "date": "yyyy-mm-dd hh:mm:mm", /*only if licensed*/
17 "url": "...", /*only if download needed*/
18 "content_type": "...",
19 "width": 000,
20 "height": 000,
21 /*additional props depending on asset type...*/
22 },
23 "size": "..."
24 }
25 },
26 "member": {
27 "member_id": 12345
28 }
29}
  • Member/Profile returns this structure. Some attributes appear only in certain situations.
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": n,
4 "license_type_id": x,
5 "has_credit_model": true||false,
6 "has_agency_model": true||false,
7 "is_cce": true||false,
8 "full_entitlement_quota": []
9 },
10 "purchase_options": {
11 "state": "...",
12 "requires_checkout": ....,
13 "message": "...",
14 "url": "..." /*only if user has no quota or overage*/
15 },
16 "member": {
17 "member_id": 12345
18 } /*only if user has quota or overage*/
19}
  • Member/Profile can also return the attribute possible_licenses if Alternative Licenses are enabled on the account.
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": 9733,
4 "license_type_id": 43,
5 "has_credit_model": false,
6 "has_agency_model": true,
7 "is_cce": true,
8 "full_entitlement_quota": {
9 "universal_credits_quota": 9733
10 },
11 "quota_ids": {
12 "universal_credits_quota": "credits"
13 },
14 "user_has_ccpro": false,
15 "organization_has_ccpro": false
16 },
17 "member": {
18 "stock_id": 14357036
19 },
20 "purchase_options": {
21 "state": "possible",
22 "requires_checkout": false,
23 "license": "Extended",
24 "message": "This will use 2 of your 9,733 credits."
25 },
26 "possible_licenses": [
27 {
28 "license": "Social_Media",
29 "license_label": "Social Media",
30 "price_with_unit": "5 Credits"
31 },
32 {
33 "license": "Extended",
34 "license_label": "Extended",
35 "price_with_unit": "2 Credits"
36 }
37 ]
38}

Response attributes

NameDescription
available_entitlement{...}
Information about licenses available for this user. Structure.
available_entitlement:
    quota
Quantity of licenses/credits remaining available for this user for this asset type. Integer.
available_entitlement:
    license_type_id
License type of combined asset and license. Integer.
available_entitlement:
    has_credit_model
(Enterprise only) Type of enterprise contract model. Boolean.
available_entitlement:
    has_agency_model
(Enterprise only) Type of enterprise contract model. Boolean.
available_entitlement:
    is_cce
Whether this is an enterprise entitlement or not. Boolean.
available_entitlement:
    full_entitlement_quota
Licensing quota types available. This information is subject to change as new license types are added and subtracted; best practice is to use the main available_entitlement.quota value instead. Array.
contents{...}
Licensing information for this asset for this user. Structure.
The number directly inside contents is the same asset ID number that is returned in content_id:
"contents": { "12345": { "content_id": 12345, ... }, ... }

contents:
    content_id

Asset's unique identifier. String.
contents:
    purchase_details{...}
Information about the user's purchase/license of this asset. Structure.
contents:
  purchase_details:
    state
User's purchase relationship to an asset. Possible values and meanings:
  • not_purchased: User has not at any time in the past purchased the asset.
  • purchased : User has at some time in the past purchased the asset.
  • cancelled: User attempted to buy the asset and for some reason the order did not go through.
  • not_possible: User must go to the Adobe Stock site to buy plan or asset.
  • just_purchased: User bought asset within the current session.
  • overage: Adobe Stock has a payment instrument on file for the user and can bill the user for additional purchases. Does not apply to enterprise as it is always possible to add additional licenses.
contents:
  purchase_details:
    license
Type of license that the user has for this asset. String. For possible values, see URL parameters, above.
contents:
  purchase_details:
    date
Date when the asset was purchased or licensed. Date format.
contents:
  purchase_details:
    url
The URL from which the licensed asset can be downloaded. String.
contents:
  purchase_details:
    content_type
Mime type of asset. String.
contents:
  purchase_details:
    width/height/...
Dimensions and other physical properties of asset. Mixed types.
contents:
    size
The size of the asset, indicating whether it is the free complementary size or the original full-sized asset. String. Possible values:
  • Comp
  • Original
purchase_options {...}
Information about the user's purchasing options for this asset. Structure.
member {...}
Information about the user; for Adobe Stock internal use.
purchase_options:
    requires_checkout
Whether a purchase in process requires going to the Adobe Stock site for completion. Returns true or false. Boolean.
purchase_options:
    message
Message to display to your user in response to a Licensing API query. String. All returned messages are localized and generated for you by the Stock API. This provides uniform messaging for all clients of Stock API.
purchase_options:
    state
User's purchase relationship to an asset. See contents.purchase_details.state above. String.
purchase_options:
    url
Only displayed if user is not able to license asset. URL directs user to Adobe Stock site to get plan. String.
possible_licenses {...}
This block is returned if Alternative Licenses are enabled for the account. Structure.
possible_licenses:
    license
License field value. For possible values, see URL parameters, above. String.
possible_licenses:
    license_label
Name of license to display to user (text localized by locale command). String.
possible_licenses:
    price_with_unit
Cost in credits for user (text localized by locale command). String.

Examples

Content/Info

Asset not purchased by this user

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Content/Info?content_id=59741022&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "contents": {
3 "59741022": {
4 "content_id": 59741022,
5 "purchase_details": {
6 "member_id": 23456,
7 "state": "not_purchased"
8 },
9 "size": "Comp"
10 }
11 },
12 "member": {
13 "member_id": 23456
14 }
15}

Asset purchased by this user with Extended license

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Content/Info?content_id=62047262&license=Extended&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "contents": {
3 "62047262": {
4 "content_id": 62047262,
5 "purchase_details": {
6 "date": "2015-02-10 15:00:00",
7 "license": "Extended",
8 "state": "purchased"
9 },
10 "size": "Original"
11 }
12 },
13 "member": {
14 "member_id": 23456
15 }
16}

Content/License

Just-licensed asset with existing quota

Download from the purchase_details.url and indicate how many purchasing options remain for the user. You can download the asset again without using any quota or making a purchase.

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Content/License?content_id=62305369&license=Standard&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": 48,
4 "license_type_id": 42,
5 "has_credit_model": false,
6 "has_agency_model": true,
7 "is_cce": true,
8 "full_entitlement_quota": {
9 "image_quota": 48
10 }
11 },
12 "contents": {
13 "62305369": {
14 "content_id": "62305369",
15 "size": "Comp",
16 "purchase_details": {
17 "state": "just_purchased",
18 "license": "Standard",
19 "date": "2017-11-01 22:57:48",
20 "url": "https://stock.adobe.com/Rest/Libraries/Download/62305369/1",
21 "content_type": "image/jpeg",
22 "width": 3333,
23 "height": 2222
24 }
25 }
26 }
27}

Using license references in license request

If your enterprise account is configured to require or allow optional license references, then the Content/License request must be made a POST, adding the references as JSON in the body of the message. Additionally, the Content-Type of the request should be application/json.

Copied to your clipboard
1curl --location --request POST 'https://stock.adobe.io/Rest/Libraries/1/Content/License?content_id=172563501&license=Extended' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken' --header 'Content-Type: text/plain' --data-raw '{
2 "cce_agency": [
3 { "id": "2", "value": "Project Banana" },
4 { "id": "4", "value": "King Kong Co" }
5 ]
6}'

JSON response is identical to response for a normal GET Content/License request.

Member/Profile

User has quota

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Member/Profile?content_id=112670342&license=Standard&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": 48,
4 "license_type_id": 1,
5 "has_credit_model": false,
6 "has_agency_model": false,
7 "is_cce": false,
8 "full_entitlement_quota": {
9 "image_quota": 48
10 }
11 },
12 "member": {
13 "stock_id": 1272100
14 },
15 "purchase_options": {
16 "state": "possible",
17 "requires_checkout": false,
18 "message": "This will use 1 of your 48 licenses."
19 }
20}

User has no quota but has an overage plan

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Member/Profile?content_id=64285595&license=Standard&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": 0,
4 "license_type_id": 1,
5 "has_credit_model": false,
6 "has_agency_model": false,
7 "is_cce": false,
8 "full_entitlement_quota": {
9 "image_quota": 0
10 }
11 },
12 "purchase_options": {
13 "state": "overage",
14 "requires_checkout": false,
15 "message": "Would you like to license the image for $2.99?"
16 },
17 "member": {
18 "member_id": 34567
19 }
20}

User has no quota or overage plan

Copied to your clipboard
curl --location --request GET 'https://stock.adobe.io/Rest/Libraries/1/Member/Profile?content_id=64285595&locale=en_US' --header 'X-Product: MySampleApp/1.0' --header 'x-api-key: MyApiKey' --header 'Authorization: Bearer MyAccessToken'
Copied to your clipboard
1{
2 "available_entitlement": {
3 "quota": 0,
4 "full_entitlement_quota": {
5 "image_quota": 0
6 }
7 },
8 "purchase_options": {
9 "state": "not_possible",
10 "requires_checkout": true,
11 "message": "Would you like to see purchase options?",
12 "url": "http://stock.adobe.io/plans?image_id=64285595"
13 }
14}

Error codes

Each error generates a JSON array that contains the following keys and values. If your application receives this array and you need assistance, send the array to Adobe.

  • An error key.
  • Optionally, a code key. Specifies an integer designating the category of error. Code values:
    • 10: Invalid access token. The access token that you passed is invalid or expired.
    • 11: Invalid API Key. The API key that you passed is not valid or has expired.
    • 20: Invalid parameters. The URL parameters that you passed are not supported.
    • 31: Invalid Method. The method that you specified does not exist in the method list.
    • 100: Invalid data. Data that you specified as arguments are not supported.

Downloading licensed files

The Content/License method returns a download URL, which uses the Libraries/Download endpoint. This URL can be accessed via a normal GET request over an HTTPS connection.

EndpointMethod
GET

In the URL above, the {id} value must be substituted with the Adobe Stock ID attribute, while {license} is an integer returned by Adobe Stock in the download URL. Because this integer value can change without notice, it is recommended not to predict this value, but to get it by calling the Content/License method to first obtain the download URL.

Authentication

Unlike other Stock API license methods, Download does not use request headers for authentication; using an authentication header can break the download URL. Instead, the access token needs to be sent via a URL parameter--see below.

Request headers

None (see above).

URL parameters

ParameterDescription
token
Valid access token. String. Required, used in place of the Authorization: Bearer {token} authentication header.

The token does not need to be the same one used to license the asset as long as it is from the same user or enterprise entitlement.

size
Optional, requested image size. Integer. Only valid for bitmap/image assets and videos only (e.g., does not apply to template, vector, or 3D assets.)

If command is not present, file returned will be full/original size. Valid values:

5000: 5000px or original size image
3100: 3100-4999px image
2400: 2400-3099px image
1600: 1600-2399px image
800: 800-1599px image
400: 799px or smaller image
2160: Full/original 4K video
1080: HD 1080 video

Response

A valid response will trigger a file download, otherwise, an error will be returned. Downloads will typically consist of a 302 redirect which points to a signed URL, but some downloads are served directly without a redirect.

Examples

In the following examples, "MyAccessToken" would be substituted with a valid access token generated by your application. When using curl, be sure to include the "follow redirects" option (-L on the command line.)

Download of original asset

Copied to your clipboard
curl -L "https://stock.adobe.com/Rest/Libraries/Download/62305369/1?token=MyAccessToken" > "AdobeStock_62305369.jpeg"

Download of 1600px image

Copied to your clipboard
curl -L "https://stock.adobe.com/Rest/Libraries/Download/62305369/1?token=MyAccessToken&size=1600" > "AdobeStock_62305369-1600.jpeg"

Download of 1080p rendition of video

Copied to your clipboard
curl -L "https://stock.adobe.com/Rest/Libraries/Download/99872034/1?token=MyAccessToken&size=1080" > "AdobeStock_99872034-1080.mp4"

Download errors

  • This download cannot be processed, invalid size: Size command must be one of the values listed above, and file must be an image or video asset.
  • This download is expired: Token has expired
  • Cannot find a download for this file and license on this organization: Invalid access token, or generated for wrong user/account, or asset is not actually licensed. Use Content/Info or Member/Profile for more information.

More information

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