Test a Callback Authorization URL
Never calls DRMtoday - POSTs a synthetic request (shaped like DRMtoday's own JSON Callback Authorization request) directly to the given URL and returns the raw result. Use it to verify a callback endpoint before switching mode to CALLBACK or UPFRONT_CALLBACK.
curl -X POST "https://api.5centscdn.com/v2/drm/auth/test-callback" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"callbackUrl": "https://example.com/drm/callback",
"assetId": "2ba1e28f1b9614c18c9318c5293d78df",
"userId": "test-user",
"sessionId": "test-session",
"clientIp": "192.0.2.123"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/drm/auth/test-callback"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"callbackUrl": "https://example.com/drm/callback",
"assetId": "2ba1e28f1b9614c18c9318c5293d78df",
"userId": "test-user",
"sessionId": "test-session",
"clientIp": "192.0.2.123"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/drm/auth/test-callback", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"callbackUrl": "https://example.com/drm/callback",
"assetId": "2ba1e28f1b9614c18c9318c5293d78df",
"userId": "test-user",
"sessionId": "test-session",
"clientIp": "192.0.2.123"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"callbackUrl": "https://example.com/drm/callback",
"assetId": "2ba1e28f1b9614c18c9318c5293d78df",
"userId": "test-user",
"sessionId": "test-session",
"clientIp": "192.0.2.123"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/drm/auth/test-callback", 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/test-callback')
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 = '{
"callbackUrl": "https://example.com/drm/callback",
"assetId": "2ba1e28f1b9614c18c9318c5293d78df",
"userId": "test-user",
"sessionId": "test-session",
"clientIp": "192.0.2.123"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"statusCode": 200,
"timingMs": 142,
"requestBody": {
"asset": "2ba1e28f1b9614c18c9318c5293d78df",
"user": "test-user",
"session": "test-session",
"client": "cdn-dashboard-test",
"drmScheme": "WIDEVINE_MODULAR",
"requestMetadata": {
"remoteAddr": "192.0.2.123",
"userAgent": "CDN-Dashboard-CallbackTester/1.0"
}
},
"responseBody": "YOUR_CALLBACK_RESPONSE_BODY"
}
/drm/auth/test-callback
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
Callback Authorization URL to test.
Asset ID to send in the synthetic request. Defaults to test-asset.
User ID to send in the synthetic request. Defaults to test-user.
Session ID to send in the synthetic request. Defaults to test-session.
Client IP address to send in the synthetic request. Defaults to 192.0.2.123.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
Callback Authorization URL to test.
https://example.com/drm/callbackAsset ID to send in the synthetic request. Defaults to test-asset.
2ba1e28f1b9614c18c9318c5293d78dfSession ID to send in the synthetic request. Defaults to test-session.
test-sessionClient IP address to send in the synthetic request. Defaults to 192.0.2.123.
192.0.2.123Responses
Operation outcome. Returns error on a request-level failure such as a connection error.
successerrorHTTP status the callback URL responded with. Only present when result is success.
Round-trip time of the callback request in milliseconds.
The synthetic Callback Authorization request body that was sent, shaped like DRMtoday's own, built from the assetId, userId, sessionId and clientIp values supplied.
Raw callback response body returned by your server, truncated to 8KB. Only present when result is success.