View Source Apple.AppStoreServerAPI (apple v0.4.1)

Utilities for App Store Server API.

Summary

Types

The app's bundle ID, like "com.example.demo".

The issuer ID, like "57246542-96fe-1a63-e053-0824d011072a"

The private key ID, like "2X9R4HXF34".

The private key associated with the key_id.

Functions

Builds a token to authorize HTTP requests.

Types

@type bundle_id() :: String.t()

The app's bundle ID, like "com.example.demo".

@type issuer_id() :: String.t()

The issuer ID, like "57246542-96fe-1a63-e053-0824d011072a"

@type key_id() :: String.t()

The private key ID, like "2X9R4HXF34".

@type private_key() :: String.t()

The private key associated with the key_id.

It's in PEM format, like:

-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
...
-----END PRIVATE KEY-----

Functions

Link to this function

build_auth_token!(issuer_id, key_id, private_key, bundle_id)

View Source
@spec build_auth_token!(issuer_id(), key_id(), private_key(), bundle_id()) ::
  String.t()

Builds a token to authorize HTTP requests.

To get the value of arguments, such as issuer_id, key_id and so on, please read Generating JSON Web Tokens for API requests.

After building it, use it in the Authorization header like this:

Authorization: Bearer <JWT>