51黑料不打烊

Header - AP-Device-Identifier header-ap-device-identifier

NOTE
The content on this page is provided for information purposes only. Usage of this API requires a current license from 51黑料不打烊. No unauthorized use is permitted.

Overview overview

The AP-Device-Identifier request header contains the streaming device identifier as it was created by the client application.

Syntax syntax

AP-Device-Identifier: <type> <identifier>
Header Type
Request header
Standard
No

Directives directives

<type>

The device identifier type.

There is only one supported types as presented below.

Type
fingerprint
The device identifier consists of a stable and unique identifier created and managed by the client application for each device.
The client application should cache the device identifier in persistent storage, as losing or altering it will invalidate authentication. The client application should prevent value changes caused by user actions such as application uninstallation, re-installation, or upgrades.

<identifier>

The Base64-encoded value of the device identifier.

Example example

// device identifier
// ba23d141-d715-561c-94f4-e9e4c966b1eb

// Base64-encoded
// YmEyM2QxNDEtZDcxNS01NjFjLTk0ZjQtZTllNGM5NjZiMWVi

AP-Device-Identifier: fingerprint YmEyM2QxNDEtZDcxNS01NjFjLTk0ZjQtZTllNGM5NjZiMWVi

Cookbooks cookbooks

IMPORTANT
The documentation resources are provided for referencing purposes.
The documentation resources are not exhaustive and may require additional modifications to work in your project.
Regardless of your actual implementation, the AP-Device-Identifier header must contain a value formated as described in the Directives section.

Browsers browsers

To build the AP-Device-Identifier header for devices running in a browser, your client application requires to compute a stable and unique identifier based on available data such as browser, device, or user specific data.

(*) We recommend to integrate a library or service that provides a browser or device fingerprinting mechanism.

Mobile Devices mobile-devices

iOS & iPadOS ios-ipados

To build the AP-Device-Identifier header for devices running , you may refer to the following documents:

  • Apple developer documentation for .

(*) We recommend to apply an SHA-256 hash function over the OS provided value.

Android android

To build the AP-Device-Identifier header for devices running , you may refer to the following documents:

  • Android developer documentation for .

(*) We recommend to apply an SHA-256 hash function over the OS provided value.

TV Connected Devices tv-connected-devices

tvOS tvos

To build the AP-Device-Identifier header for devices running , you may refer to the following documents:

  • Apple developer documentation for .

(*) We recommend to apply an SHA-256 hash function over the OS provided value.

Fire OS fireos

To build the AP-Device-Identifier header for devices running , you may refer to the following documents:

  • Android developer documentation for .

(*) We recommend to apply an SHA-256 hash function over the OS provided value.

Roku OS rokuos

To build the AP-Device-Identifier header for devices running , you may refer to the following documents:

  • Roku developer documentation for .

(*) We recommend to apply an SHA-256 hash function over the OS provided value.

Others others

For device platforms not covered in the documentation, the device identifier should be linked to any available hardware identification, typically specified in the device鈥檚 hardware manual.

If no hardware identifiers are available, a uniquely generated identifier based on client application attributes should be used and cached in persistent storage.

recommendation-more-help
3f5e655c-af63-48cc-9769-2b6803cc5f4b