Edit this on Github

Headers for Stock API calls

All Adobe Stock API calls require certain headers and allow the inclusion of optional headers.

Headers

Header Detail
x-api-key

Required string. The API key assigned to your API client account when you signed up through adobe.io. See Register your app.

Example:
x-api-key: a74b00000dcf4075bea68fca6306a1aa

X-Product

Required string. The name of your application that is using the API. A common convention is to use the app name followed by a slash and the product version.

Example:
X-Product: MySampleApp/1.0

Authorization

For the Search API, this is optional. For the Licensing API, it is required. An access token issued by Adobe IMS. See API authentication. The Stock API uses this to access your user's member identifier, licensing status, and default locale for localizing categories and messages that the API returns. In the header, the access token must be preceded by "Bearer ".

Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ

X-Request-Id

Optional string. A unique request identifier that you define. Used by Adobe Support to trace the request in logs. This header is automatically generated by the server and returned in the response if you do not set it explicitly. See below for example.

Examples

Headers and parameters for a search GET

GET /Rest/Media/1/Search/Files?locale=en_US&search_parameters[words]=unicorns HTTP/1.1
Host: stock.adobe.io
X-Product: MySampleApp/1.0
x-api-key: a74b00000dcf4075bea68fca6306a1aa

Headers and parameters for a licensing information GET

GET /Rest/Libraries/1/Member/Profile?content_id=112670342&license=Standard&locale=en_US HTTP/1.1
Host: stock.adobe.io
X-Product: MySampleApp/1.0
x-api-key: a74b00000dcf4075bea68fca6306a1aa
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ

Request ID returned in search response (for troubleshooting)

This is a response to the search request (like the one above), where the API key is not valid. In this case, the request ID is 50eYaxEFurUlb8bOpkxcnzydg6aGiUgc, and could be used for further troubleshooting by Adobe if necessary.

HTTP/1.1 403 Forbidden
Content-Type: application/json
Date: Fri, 10 Nov 2017 20:13:08 GMT
Server: APIP
X-Request-Id: 50eYaxEFurUlb8bOpkxcnzydg6aGiUgc
Content-Length: 55
Connection: Close

{"error_code":"403003","message":"Api Key is invalid"}