Twickddocs

Digital Rights Management

Twickd does offer free access to a DRM (Digital Rights Management) API so creators can securely check the validity of the purchases.

Request

Endpoint

POST https://twickd.com/api/drm

You can either hit the Twickd DRM API directly with URL queries

https://twickd.com/api/drm?key=9dea8d62a27d3d56c5dd6b2304dbe81b&udid=TEST&identifier=com.twickd.tacitus

Or with JSON in the request body

{
    "key": "9dea8d62a27d3d56c5dd6b2304dbe81b",
    "udid": "TEST",
    "identifier": "com.twickd.tacitus"
}
We strongly recommend you to use a server as a middleware between your product and the DRM API to prevent your Developer key from being publicly accessible. Twickd can not be taken as responsible if your Developer key is leaked due to a misuse.

Request parameters

  • key: You developer key (that can be found in your Developer Settings)
  • udid: The Unique Device Identifier of your customers device.
  • identifier: The package identifier or bundle id. (i.e: com.twickd.tacitus)

To get the Unique Device Identifier in your package, you can use the following code:

# Declare
OBJC_EXTERN CFStringRef MGCopyAnswer(CFStringRef key) WEAK_IMPORT_ATTRIBUTE;

# Use this to get the UDID
CFStringRef UDID = MGCopyAnswer(CFSTR("UniqueDeviceID"));

Response

Once your request has been sent to our server, the data will be analyzed and you should receive one of those 3 Json responses

  • Success:
{
    "success": true,
    "code": 200
}
  • Device not allowed to use the package:
{
    "success": false,
    "code": 201,
    "error": "This device is not allowed to use this package"
}
  • Bad request:
{
    "success": false,
    "code": 400,
    "error": "Bad request"
}

If you experience any issue with the Digital Rights Management system, please contact us!

Latest revision: Oct 28, 2020