Update License Authorization settings
curl -X POST "https://api.5centscdn.com/v2/drm/auth" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"mode": "UPFRONT",
"callbackUrl": "https://example.com/drm/callback",
"callbackAdapterId": null,
"allowCrtTemplateId": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/drm/auth"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"mode": "UPFRONT",
"callbackUrl": "https://example.com/drm/callback",
"callbackAdapterId": null,
"allowCrtTemplateId": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/drm/auth", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"mode": "UPFRONT",
"callbackUrl": "https://example.com/drm/callback",
"callbackAdapterId": null,
"allowCrtTemplateId": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"mode": "UPFRONT",
"callbackUrl": "https://example.com/drm/callback",
"callbackAdapterId": null,
"allowCrtTemplateId": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/drm/auth", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/drm/auth')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"mode": "UPFRONT",
"callbackUrl": "https://example.com/drm/callback",
"callbackAdapterId": null,
"allowCrtTemplateId": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34"
}'
response = http.request(request)
puts response.body
{
"result": "success"
}
/drm/auth
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
License authorization mode. DENY blocks every request. UPFRONT authorizes via a signed CRT JWT presented up front (recommended). CALLBACK authorizes via a live HTTP callback to your server per request. UPFRONT_CALLBACK uses the upfront token and falls back to the callback. ALLOW authorizes everything matching a given CRT template. TEST allows everything (non-production only).
Callback Authorization URL. Required when mode is CALLBACK or UPFRONT_CALLBACK.
Optional DRMtoday callback adapter ID.
CRT template ID applied to every request. Required when mode is ALLOW.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
License authorization mode. DENY blocks every request. UPFRONT authorizes via a signed CRT JWT presented up front (recommended). CALLBACK authorizes via a live HTTP callback to your server per request. UPFRONT_CALLBACK uses the upfront token and falls back to the callback. ALLOW authorizes everything matching a given CRT template. TEST allows everything (non-production only).
DENYUPFRONTCALLBACKUPFRONT_CALLBACKALLOWTESTCallback Authorization URL. Required when mode is CALLBACK or UPFRONT_CALLBACK.
https://example.com/drm/callbackCRT template ID applied to every request. Required when mode is ALLOW.
c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34Responses
Operation outcome.
successerror