curl --request POST \
--url https://sdk.anghami.com/v1/streaming/video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://sdk.anghami.com/v1/streaming/video"
payload = {}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://sdk.anghami.com/v1/streaming/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sdk.anghami.com/v1/streaming/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sdk.anghami.com/v1/streaming/video"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sdk.anghami.com/v1/streaming/video")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.anghami.com/v1/streaming/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"stream": {
"manifestUrl": "<string>",
"drmScheme": "DRM_SCHEME_UNSPECIFIED",
"licenseUrl": "<string>",
"drmParams": {},
"expiresInSeconds": 123,
"availableQualities": [
{
"label": "<string>",
"bitrateKbps": 123,
"codec": "<string>"
}
]
}
}{
"violations": [
{
"field": "<string>",
"description": "<string>"
}
]
}{
"message": "<string>"
}AcquireVideoStream
AcquireVideoStream acquires a stream URL for playing a video (episode or movie). This is the billable event for video playback.
curl --request POST \
--url https://sdk.anghami.com/v1/streaming/video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://sdk.anghami.com/v1/streaming/video"
payload = {}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://sdk.anghami.com/v1/streaming/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sdk.anghami.com/v1/streaming/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sdk.anghami.com/v1/streaming/video"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sdk.anghami.com/v1/streaming/video")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdk.anghami.com/v1/streaming/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"stream": {
"manifestUrl": "<string>",
"drmScheme": "DRM_SCHEME_UNSPECIFIED",
"licenseUrl": "<string>",
"drmParams": {},
"expiresInSeconds": 123,
"availableQualities": [
{
"label": "<string>",
"bitrateKbps": 123,
"codec": "<string>"
}
]
}
}{
"violations": [
{
"field": "<string>",
"description": "<string>"
}
]
}{
"message": "<string>"
}Headers
OAuth 2.0 Bearer token with the 'stream' scope. Required for all streaming operations. Format: Bearer <access_token>.
"Bearer eyJhbGciOiJSUzI1NiIs..."
Preferred locale for error messages and metadata (BCP 47).
"ar"
Body
AcquireVideoStreamRequest is the request message for acquiring a video stream. This is the billable event for video playback.
MovieID is a typed identifier for a movie.
Show child attributes
Show child attributes
EpisodeID is a typed identifier for an episode.
Show child attributes
Show child attributes
VideoQuality enumerates the available video stream quality tiers.
VIDEO_QUALITY_UNSPECIFIED, VIDEO_QUALITY_SD, VIDEO_QUALITY_HD, VIDEO_QUALITY_FULL_HD, VIDEO_QUALITY_UHD Response
Successful response
AcquireVideoStreamResponse is the response message containing the video stream details.
StreamInfo contains the information required to play a stream. Returned by all stream acquisition RPCs.
Show child attributes
Show child attributes