Skip to content

Instantly share code, notes, and snippets.

@andrewwiik
Last active March 14, 2022 10:41
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save andrewwiik/e4f8a6141bbde4a6db34cba6fe128ea3 to your computer and use it in GitHub Desktop.
Save andrewwiik/e4f8a6141bbde4a6db34cba6fe128ea3 to your computer and use it in GitHub Desktop.
Packix DRM API

Packix DRM API

Packix now has a DRM API that tweak developers can hit from their servers to verify purchases for DRM reasons. You will need to send the package identifier (com.author.tweakname thing), device UDID, device Model (like iPhone7,2) and a developer access key you have generated in the Packix Developer Portal under "Developer->Keys". You should always use your server as an inbetween with the packix DRM API as to not reveal your developer access key that you generated.

The endpoint is:

POST https://repo.packix.com/api/drm/check: Get Information on whether the UDID and Device Model own the package

Request

Parameters

ALL PARAMETERS ARE REQUIRED

udid: The Device's UDID (Unique Device Identifier)

model: The Device's Model Identifer (iPhone7,2)

identifier: The Package Identifier (com.atwiiks.testtweak for example)

token: Your Developer Access Key that you generated in the Packix Developer Portal under Developer->Keys

Passing the Parameters

1. As all url query parameters like so: POST https://repo.packix.com/api/drm/check?udid=8273eebdb32a26093e66681a716eaa455ed0e746&model=iPhone7,2&identifier=com.example.tweak&token=640f0b36-688d-481a-b03a-9886cc59323a

2. With a JSON Request Body: POST https://repo.packix.com/api/drm/check

Request Body

{
  "udid":"8273eebdb32a26093e66681a716eaa455ed0e746",
  "model":"iPhone7,2",
  "identifier":"com.example.tweak",
  "token":"640f0b36-688d-481a-b03a-9886cc59323a"
}

You can also pass the Developer Access Key in a header named Token or Authorization

Response

The endpoint will return one of three responses in JSON:

1. The device and model are allowed to use the package:

{
  "status":"completed"
}

2. The device and model are not allowed to use the package

{
  "status":"failed"
}

3. Something in the request did not match up with what the server was expecting

{
  "status":"error"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment