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 |
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 eyJhbG... |
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
Copied to your clipboardGET /Rest/Media/1/Search/Files?locale=en_US&search_parameters[words]=unicorns HTTP/1.1Host: stock.adobe.ioX-Product: MySampleApp/1.0x-api-key: a74b00000dcf4075bea68fca6306a1aa
Headers and parameters for a licensing information GET
Copied to your clipboardGET /Rest/Libraries/1/Member/Profile?content_id=112670342&license=Standard&locale=en_US HTTP/1.1Host: stock.adobe.ioX-Product: MySampleApp/1.0x-api-key: a74b00000dcf4075bea68fca6306a1aaAuthorization: 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.
Copied to your clipboardHTTP/1.1 403 ForbiddenContent-Type: application/jsonDate: Fri, 10 Nov 2017 20:13:08 GMTServer: APIPX-Request-Id: 50eYaxEFurUlb8bOpkxcnzydg6aGiUgcContent-Length: 55Connection: Close{"error_code":"403003","message":"Api Key is invalid"}