Customer Sign In

upLynk

Integration APIs: Auth token

Overview

To initiate playback, you generate a playback URL with a digitally-signed authorization token (or "auth token"). This module contains APIs for working with auth tokens.

/token/checkurl

Verifies a playback URL with an auth token, similar to the token tester in the CMS UI. This API is for testing only and not for use in a production environment.

Request parameters
urlstringThe full playback URL, with an authorization token as a query string.
Response parameters
noteslistA list of objects detailing the analysis of the URL. Each object contains a msg and type member. The msg is a human-readable description of the note, and the type is one of 'ok', 'error', 'warning', 'info', 'question'.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Call('/api2/token/checkurl', url='http://content.uplynk.com/channel/0933d7856fc54e759032c3296dc4613e.m3u8?iph=12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0&oid=a735c56ea4014685bc74c0a375236cc5&cid=0933d7856fc54e759032c3296dc4613e&exp=1365781908&ct=c&sig=839c2a1dbfcba933b11456fa2bf9d3e4f69919b5802827115f3ed562e116c923')
{
    "notes": [
        {
            "msg": "Valid hostname found",
            "type": "ok"
        },
        {
            "msg": "M3U8 format (standard URL)",
            "type": "info"
        },
        {
            "msg": "URL type: Channel by ID",
            "type": "info"
        },
        {
            "msg": "The channel does exist",
            "type": "ok"
        },
        {
            "msg": "Query string found",
            "type": "ok"
        },
        {
            "msg": "Content type is correct ('c')",
            "type": "ok"
        },
        {
            "msg": "Token signature is valid",
            "type": "ok"
        },
        {
            "msg": "Token has not yet expired (2592000 seconds left)",
            "type": "ok"
        },
        {
            "msg": "URL content ID and token content ID match",
            "type": "ok"
        },
        {
            "msg": "IP address hash matches",
            "type": "ok"
        },
        {
            "msg": "No ads will be inserted during playback",
            "type": "info"
        }
    ],
    "error": 0
}

As noted, this API is intended for use during the development or testing phase of a project, and not for use in a production environment. An example of an appropriate use of this API would be as part of a regression test suite. An example of an inappropriate use of this API would be calling it each time your system generates an auth token in a deployed website. If you are unsure if whether or not your use case is appropriate, contact upLynk support. Inappropriate use of this API can lead to additional charges in your account and/or account termination.