Consola del desarrollador
Gracias por tu visita. Esta página solo está disponible en inglés.

Amazon Music Device API

Request Headers

Overview

HTTP request headers are typically sent with every request to the API and include important required parameters such as authorization information used for authentication. They can contain additional optional information which may do things such as specify the size of images to return. When making requests to Playback APIs, there are some additional request headers that are necessary. These are detailed below.

Headers table

The following HTTP Request headers are supported by Amazon Music's Web API endpoints:

Header Required? Description
Content-Type For POST requests Whenever the client sends a POST request with a JSON payload, the header should be set to "application/json."
Authorization Yes A bearer token obtained from the Login With Amazon authorization service
Accept-Language No A valid language code (see section on Localization for list)
amzn-image-style No Resizes images to fit the longer side to the specified resolution:
Supported values are: "SL500" (500 px), "SL160" (160 px), "SL110" (110 px), "SL75" (75 px), "SL30" (30 px)
X-Amzn-Audio-DRMType For playback A comma separated list of supported DRM solutions. Ex value: `widevine`
X-Amzn-Audio-Device-Capability For playback A comma separated list of supported playback qualities.
x-amzn-device-Id Yes A unique ID for the device making the request.
We recommend using an identifer that doesn't change across sessions, e.g. the hash value of an MAC address.

Accept-Language

Please see the section on Language Localization for details.

Authorization

For information on obtaining a bearer authorization token, see Login With Amazon (LWA).

Ex: Authorization: Bearer Atza|...

DRM Type

The X-Amzn-Audio-DrmType request header specifies which DRM solution to use for streaming HD and Spatial audio. At this time, Amazon Music only supports Widevine.

Ex: X-Amzn-Audio-DrmType = WIDEVINE

Audio Quality

The X-Amzn-Audio-Device-Capability request header specifies the audio quality levels supported by your device as a comma-separated list.

These are the audio quality levels currently supported by Amazon Music:

  • STD_RES
    • Standard-quality playback using OPUS over Dash.
    • Bit rates at low, medium, and high are 48, 192, and 320 kbps respectively.
  • HI_FI
    • HD-quality playback using FLAC over DASH.
    • 16 bits, from 44.1 kHz.
  • HI_RES
    • Ultra HD-quality playback using FLAC over DASH.
    • 24 bits, from 44.1 kHz to 192 kHz.
  • THREE_DIMENSIONAL
    • Dolby Atmos-quality using DD+.
    • 16 bit.
  • REAL_AUDIO_360
    • Reality Audio 360 quality over MPEG-H.
    • 16 bit.

Ex: X-Amzn-Audio-Device-Capability = STD_RES, HI_FI, HI_RES