### GET https://sdk.anghami.com/readyz Source: https://docs.sdk.anghami.com/health-endpoints Checks if the API is ready to serve traffic by verifying upstream dependencies. ```APIDOC ## GET https://sdk.anghami.com/readyz ### Description Checks if the API is ready to serve traffic by verifying upstream dependencies. Returns 503 if a critical dependency is unavailable. ### Method GET ### Endpoint https://sdk.anghami.com/readyz ### Response #### Success Response (200) - **status** (string) - The overall readiness status (ok, degraded, or unavailable). - **checked_at** (string) - Timestamp of the check. - **dependencies** (object) - Map of dependency states. #### Response Example { "status": "ok", "checked_at": "2026-04-30T12:34:56Z", "dependencies": { "catalog_db": "ok", "search_index": "ok", "stream_signing": "ok" } } ``` -------------------------------- ### Protocol Buffer Message Definitions Source: https://docs.sdk.anghami.com/api-reference/developerservice/updateapikey Example message structures for Profile and User entities. ```protobuf message Profile { User user = 1; Photo photo = 2; } message User { string display_name = 1; string address = 2; } ``` -------------------------------- ### GET /v1/auth/authorize Source: https://docs.sdk.anghami.com/authentication Initiates the OAuth authorization flow by redirecting the user to the authorization server. ```APIDOC ## GET /v1/auth/authorize ### Description OAuth authorization endpoint used for browser redirects. ### Method GET ### Endpoint /v1/auth/authorize ### Parameters #### Query Parameters - **client_id** (string) - Required - **redirect_uri** (string) - Required - **response_type** (string) - Required - Must be 'code' - **scope** (string) - Required - **code_challenge** (string) - Required - **code_challenge_method** (string) - Required - Must be 'S256' - **state** (string) - Required ``` -------------------------------- ### GET /v1/library/following/artists Source: https://docs.sdk.anghami.com/api-reference/libraryservice/getfollowedartists Retrieves the artists the user follows. Requires the 'read' scope. ```APIDOC ## GET /v1/library/following/artists ### Description GetFollowedArtists retrieves the artists the user follows. Requires the "read" scope. ### Method GET ### Endpoint /v1/library/following/artists ### Parameters #### Header Parameters - **Authorization** (string) - Required - OAuth 2.0 Bearer token with the 'read' scope. Format: Bearer . - **Accept-Language** (string) - Optional - Preferred locale for localized content in returned items (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of items to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. Omit for the first page. ### Response #### Success Response (200) - **items** (array) - List of followed artists (Content objects). - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### GET /v1/user/me Source: https://docs.sdk.anghami.com/api-reference/userservice/getcurrentuser Retrieves the profile of the currently authenticated user. ```APIDOC ## GET /v1/user/me ### Description GetCurrentUser retrieves the profile of the currently authenticated user. ### Method GET ### Endpoint /v1/user/me ### Parameters #### Header Parameters - **Authorization** (string) - Required - OAuth 2.0 Bearer token with the 'read' scope. Format: Bearer . - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). ### Response #### Success Response (200) - **user** (object) - The authenticated user's profile information. ``` -------------------------------- ### GET /v1/discovery/browse/genres Source: https://docs.sdk.anghami.com/api-reference/discoveryservice/browsegenres Retrieves the list of available content genres. ```APIDOC ## GET /v1/discovery/browse/genres ### Description BrowseGenres retrieves the list of available content genres. ### Method GET ### Endpoint /v1/discovery/browse/genres ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of genres to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. ### Response #### Success Response (200) - **genres** (array) - List of Genre objects. - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### Build Authorization URL Source: https://docs.sdk.anghami.com/usage-auth Construct the initial authorization request URL including PKCE parameters. ```http GET https://sdk.anghami.com/v1/auth/authorize ?client_id={CLIENT_ID} &redirect_uri={REDIRECT_URI} &response_type=code &scope=read+stream &code_challenge={CODE_CHALLENGE} &code_challenge_method=S256 &state={CSRF_TOKEN} ``` -------------------------------- ### GET /v1/discovery/browse/featured Source: https://docs.sdk.anghami.com/api-reference/discoveryservice/browsefeatured Retrieves editorially curated featured sections. ```APIDOC ## GET /v1/discovery/browse/featured ### Description BrowseFeatured retrieves editorially curated featured sections. Returns sections like "Made For You", "Trending Now", and other editorial picks. ### Method GET ### Endpoint /v1/discovery/browse/featured ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of sections to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. ### Response #### Success Response (200) - **sections** (array) - List of curated editorial sections. - **nextPageToken** (string) - Token for the next page of results. ``` -------------------------------- ### Readiness Response Body Source: https://docs.sdk.anghami.com/health-endpoints Example JSON response returned by the /readyz endpoint indicating system status and dependency health. ```json { "status": "ok", "checked_at": "2026-04-30T12:34:56Z", "dependencies": { "catalog_db": "ok", "search_index": "ok", "stream_signing": "ok" } } ``` -------------------------------- ### GET /v1/video/movies/{id} Source: https://docs.sdk.anghami.com/api-reference/videocatalogservice/getmovie Retrieves a single movie by its unique identifier. ```APIDOC ## GET /v1/video/movies/{id} ### Description GetMovie retrieves a single movie by its unique identifier. ### Method GET ### Endpoint /v1/video/movies/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the movie to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). ### Response #### Success Response (200) - **movie** (object) - The requested movie object. ``` -------------------------------- ### Brief an LLM Source: https://docs.sdk.anghami.com/agent-discovery Fetches the llms.txt file to provide an LLM with API context and scaffolding. ```bash curl -sS https://docs.sdk.anghami.com/.well-known/llms.txt ``` -------------------------------- ### GET /v1/video/episodes/{id} Source: https://docs.sdk.anghami.com/api-reference/videocatalogservice/getepisode Retrieves a single episode by its unique identifier. ```APIDOC ## GET /v1/video/episodes/{id} ### Description GetEpisode retrieves a single episode by its unique identifier. ### Method GET ### Endpoint /v1/video/episodes/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the episode to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). ### Response #### Success Response (200) - **episode** (object) - The requested episode details. #### Error Response (400) - **violations** (array) - List of validation violations. #### Error Response (default) - **message** (string) - Error message describing the failure. ``` -------------------------------- ### Batch fetch songs using MusicCatalogService Source: https://docs.sdk.anghami.com/music-catalog Demonstrates how to fetch multiple songs in a single request and handle individual results, including potential errors. ```ts const res = await music.batchGetSongs({ songIdList: ["123", "456", "789"].map(value => ({ value })), }); for (const [id, result] of Object.entries(res.results)) { if (result.song) console.log(id, result.song.title); else console.warn(id, result.error?.code); } ``` -------------------------------- ### Repository Source Layout Source: https://docs.sdk.anghami.com/architecture The directory structure for hand-edited proto files defining the SDK services and configuration. ```text sdk/shared/v1/ # Pagination, errors, identifiers, content types, media, rate limit sdk/auth/v1/ # OAuth — exchange, refresh, revoke sdk/developer/v1/ # API key management sdk/catalog/v1/ # MusicCatalogService — songs, albums, artists, lyrics sdk/video/v1/ # VideoCatalogService — shows, seasons, episodes, movies sdk/playlist/v1/ # PlaylistService sdk/library/v1/ # LibraryService — liked, saved, followed, history sdk/search/v1/ # DiscoveryService — search + browse sdk/streaming/v1/ # StreamingService — stream acquisition (billable) sdk/soundtrack/v1/ # SoundtrackService — cross-content linking sdk/user/v1/ # UserService — current user profile buf.yaml # Lint + breaking rules (STANDARD + COMMENTS) buf.gen.yaml # Generation pipeline (Go, TS, Swift, Java, Python, OpenAPI) ``` -------------------------------- ### GET /v1/music/songs/{id} Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getsong Retrieves a single song by its unique identifier. ```APIDOC ## GET /v1/music/songs/{id} ### Description GetSong retrieves a single song by its unique identifier. ### Method GET ### Endpoint /v1/music/songs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the song to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). ### Response #### Success Response (200) - **song** (object) - The requested song object containing details like title, artists, duration, and release date. #### Error Response (400) - **violations** (array) - List of validation violations when request validation fails. #### Default Error Response - **message** (string) - Error message describing the failure. ``` -------------------------------- ### GET /v1/music/artists/{id} Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getartist Retrieves a single artist by its unique identifier. ```APIDOC ## GET /v1/music/artists/{id} ### Description GetArtist retrieves a single artist by its unique identifier. ### Method GET ### Endpoint https://sdk.anghami.com/v1/music/artists/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the artist to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . Optional if x-api-key is provided. - **x-api-key** (string) - Optional - API key for server-to-server access without user context. Optional if Authorization is provided. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). Determines which language variant is returned for LocalizedString fields. ### Response #### Success Response (200) - **artist** (object) - The requested artist object. ``` -------------------------------- ### Set API Key Environment Variable Source: https://docs.sdk.anghami.com/quickstart Configure the API key for server-to-server authentication. ```bash export ANGHAMI_API_KEY="ang_live_..." ``` -------------------------------- ### GET /v1/music/albums/{id} Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getalbum Retrieves a single album by its unique identifier. ```APIDOC ## GET /v1/music/albums/{id} ### Description GetAlbum retrieves a single album by its unique identifier. ### Method GET ### Endpoint /v1/music/albums/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the album to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . Optional if x-api-key is provided. - **x-api-key** (string) - Optional - API key for server-to-server access without user context. Optional if Authorization is provided. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). Determines which language variant is returned for LocalizedString fields. ### Response #### Success Response (200) - **album** (object) - The requested album object containing details like id, title, artists, albumType, releaseDate, genres, trackCount, artwork, label, and upc. #### Error Response (400) - **violations** (array) - List of validation violations. #### Error Response (default) - **message** (string) - Error message describing the failure. ``` -------------------------------- ### Generate a typed REST client Source: https://docs.sdk.anghami.com/agent-discovery Downloads the OpenAPI bundle and uses the OpenAPI Generator CLI to produce a TypeScript client. ```bash # 1. Pull the bundle curl -sS https://docs.sdk.anghami.com/api/anghami-sdk.openapi.yaml \ -o anghami-sdk.openapi.yaml # 2. Generate npx @openapitools/openapi-generator-cli generate \ -i anghami-sdk.openapi.yaml \ -g typescript-fetch \ -o ./client ``` -------------------------------- ### GET /v1/discovery/browse/charts Source: https://docs.sdk.anghami.com/api-reference/discoveryservice/browsecharts Retrieves available popularity charts with preview entries. ```APIDOC ## GET /v1/discovery/browse/charts ### Description BrowseCharts retrieves available popularity charts with preview entries. ### Method GET ### Endpoint /v1/discovery/browse/charts ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of charts to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. ### Response #### Success Response (200) - **charts** (array) - List of charts with their top entries. - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### Define RPC HTTP Mapping Source: https://docs.sdk.anghami.com/architecture Example of using sebuf.http options to define RESTful paths and methods for RPC services. ```protobuf service MusicCatalogService { option (sebuf.http.service_config) = { base_path: "/v1/music" }; // GET /v1/music/songs/{id} rpc GetSong(GetSongRequest) returns (GetSongResponse) { option (sebuf.http.config) = { path: "/songs/{id}" method: HTTP_METHOD_GET }; } // POST /v1/music/songs:batchGet rpc BatchGetSongs(BatchGetSongsRequest) returns (BatchGetSongsResponse) { option (sebuf.http.config) = { path: "/songs:batchGet" method: HTTP_METHOD_POST }; } } ``` -------------------------------- ### GET /v1/music/artists/{artist_id}/related Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getrelatedartists Retrieves artists similar to a specific artist. ```APIDOC ## GET /v1/music/artists/{artist_id}/related ### Description GetRelatedArtists retrieves artists similar to a specific artist. ### Method GET ### Endpoint https://sdk.anghami.com/v1/music/artists/{artist_id}/related ### Parameters #### Path Parameters - **artist_id** (string) - Required - Unique identifier of the artist to find related artists for. #### Query Parameters - **page_size** (integer) - Optional - Maximum number of items to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. Omit for the first page. ### Response #### Success Response (200) - **artists** (array) - List of related artists. - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### Authenticate with API Key Source: https://docs.sdk.anghami.com/usage-auth Pass the API key in the x-api-key header for server-to-server requests. ```bash curl -sS "https://sdk.anghami.com/v1/music/songs/123456" \ -H "x-api-key: $ANGHAMI_API_KEY" ``` -------------------------------- ### GET /v1/music/artists/{artist_id}/top-tracks Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getartisttoptracks Retrieves the most popular songs by a specific artist. ```APIDOC ## GET /v1/music/artists/{artist_id}/top-tracks ### Description GetArtistTopTracks retrieves the most popular songs by a specific artist. ### Method GET ### Endpoint https://sdk.anghami.com/v1/music/artists/{artist_id}/top-tracks ### Parameters #### Path Parameters - **artist_id** (string) - Required - Unique identifier of the artist whose top tracks to retrieve. #### Query Parameters - **page_size** (integer) - Optional - Maximum number of items to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. Omit for the first page. #### Headers - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). ### Response #### Success Response (200) - **tracks** (array) - List of songs. - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### Search for Content Source: https://docs.sdk.anghami.com/quickstart Perform a paginated search query for songs or artists. ```bash curl -sS "https://sdk.anghami.com/v1/discovery/search?query=Fairouz&page_size=5" \ -H "x-api-key: $ANGHAMI_API_KEY" | jq '.results[].content.title' ``` -------------------------------- ### Exchange Authorization Code for Access Token Source: https://docs.sdk.anghami.com/api-reference Use these examples to perform an OAuth 2.0 token exchange with PKCE. Ensure the codeVerifier matches the challenge sent during the initial authorization request. ```php "https://sdk.anghami.com/v1/auth/token", 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([ 'code' => '', 'redirectUri' => '', 'clientId' => '', 'codeVerifier' => '' ]), CURLOPT_HTTPHEADER => [ "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://sdk.anghami.com/v1/auth/token" payload := strings.NewReader("{\n \"code\": \"\",\n \"redirectUri\": \"\",\n \"clientId\": \"\",\n \"codeVerifier\": \"\"\n}") req, _ := http.NewRequest("POST", url, payload) 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)) } ``` ```java HttpResponse response = Unirest.post("https://sdk.anghami.com/v1/auth/token") .header("Content-Type", "application/json") .body("{\n \"code\": \"\",\n \"redirectUri\": \"\",\n \"clientId\": \"\",\n \"codeVerifier\": \"\"\n}") .asString(); ``` ```ruby require 'uri' require 'net/http' url = URI("https://sdk.anghami.com/v1/auth/token") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{\n \"code\": \"\",\n \"redirectUri\": \"\",\n \"clientId\": \"\",\n \"codeVerifier\": \"\"\n}" response = http.request(request) puts response.read_body ``` -------------------------------- ### GET /v1/music/artists/{artist_id}/discography Source: https://docs.sdk.anghami.com/api-reference/musiccatalogservice/getartistdiscography Retrieves albums by a specific artist with optional filtering. ```APIDOC ## GET /v1/music/artists/{artist_id}/discography ### Description GetArtistDiscography retrieves albums by a specific artist with optional filtering. ### Method GET ### Endpoint /v1/music/artists/{artist_id}/discography ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Path Parameters - **artist_id** (string) - Required - Unique identifier of the artist. #### Query Parameters - **page_size** (integer) - Optional - Maximum number of items to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. - **album_types** (array) - Optional - Filter by album types. - **min_release_year** (integer) - Optional - Minimum release year filter. - **max_release_year** (integer) - Optional - Maximum release year filter. ### Response #### Success Response (200) - **albums** (array) - List of albums. - **nextPageToken** (string) - Token for the next page of results. ``` -------------------------------- ### GET /v1/discovery/browse/genres/{genre_id}/content Source: https://docs.sdk.anghami.com/api-reference/discoveryservice/getgenrecontent Retrieves content items within a specific genre. ```APIDOC ## GET /v1/discovery/browse/genres/{genre_id}/content ### Description GetGenreContent retrieves content items within a specific genre. ### Method GET ### Endpoint https://sdk.anghami.com/v1/discovery/browse/genres/{genre_id}/content ### Parameters #### Path Parameters - **genre_id** (string) - Required - Unique identifier of the genre. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of items to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. ### Response #### Success Response (200) - **items** (array) - List of content items. - **nextPageToken** (string) - Token for the next page of results. Empty if no more pages. ``` -------------------------------- ### Fetch and inject llms.txt into system prompt Source: https://docs.sdk.anghami.com/llms-txt Retrieves the llms.txt content and includes it in the system prompt to provide context for API integration. ```ts const llmsTxt = await fetch("https://docs.sdk.anghami.com/.well-known/llms.txt").then(r => r.text()); const messages = [ { role: "system", content: `You are integrating with the Anghami + OSN+ SDK. Reference:\n\n${llmsTxt}`, }, { role: "user", content: userQuery }, ]; ``` -------------------------------- ### GET /v1/discovery/browse/charts/{chart_id}/entries Source: https://docs.sdk.anghami.com/api-reference/discoveryservice/getchartentries Retrieves the full paginated entries for a specific chart. ```APIDOC ## GET /v1/discovery/browse/charts/{chart_id}/entries ### Description GetChartEntries retrieves the full paginated entries for a specific chart. ### Method GET ### Endpoint https://sdk.anghami.com/v1/discovery/browse/charts/{chart_id}/entries ### Parameters #### Path Parameters - **chart_id** (string) - Required - Unique identifier of the chart whose entries to retrieve. #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Query Parameters - **page_size** (integer) - Optional - Maximum number of entries to return per page (1-100, default 20). - **page_token** (string) - Optional - Opaque page token from a previous response. ### Response #### Success Response (200) - **entries** (array) - List of chart entries. - **nextPageToken** (string) - Token for the next page of results. - **totalCount** (integer) - Total number of entries in this chart. ``` -------------------------------- ### POST /v1/video/shows:batchGet Source: https://docs.sdk.anghami.com/api-reference/videocatalogservice/batchgetshows Retrieves multiple shows by their unique identifiers. Returns a map of ID to result, where each result is either the show or an error. ```APIDOC ## POST /v1/video/shows:batchGet ### Description BatchGetShows retrieves multiple shows by their unique identifiers. Returns a map of ID to result, where each result is either the show or an error. ### Method POST ### Endpoint https://sdk.anghami.com/v1/video/shows:batchGet ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Request Body - **showIdList** (array) - Required - A list of show identifiers to retrieve (max 100 items). ### Response #### Success Response (200) - **results** (object) - Map from requested show ID to the result (show entity or error). ``` -------------------------------- ### POST /v1/video/episodes:batchGet Source: https://docs.sdk.anghami.com/api-reference/videocatalogservice/batchgetepisodes Retrieves multiple episodes by their unique identifiers. Returns a map of ID to result, where each result is either the episode or an error. ```APIDOC ## POST /v1/video/episodes:batchGet ### Description BatchGetEpisodes retrieves multiple episodes by their unique identifiers. Returns a map of ID to result, where each result is either the episode or an error. ### Method POST ### Endpoint https://sdk.anghami.com/v1/video/episodes:batchGet ### Parameters #### Header Parameters - **Authorization** (string) - Optional - OAuth 2.0 Bearer token for user-authenticated requests. Format: Bearer . - **x-api-key** (string) - Optional - API key for server-to-server access without user context. - **Accept-Language** (string) - Optional - Preferred locale for localized content (BCP 47). #### Request Body - **episodeIdList** (array) - Required - A list of episode identifiers to retrieve (max 100 items). ### Response #### Success Response (200) - **results** (object) - Map from requested episode ID to the result (episode entity or error). ``` -------------------------------- ### Browse Featured Catalog Source: https://docs.sdk.anghami.com/quickstart Retrieve curated featured sections using the API key. ```bash curl -sS "https://sdk.anghami.com/v1/discovery/browse/featured" \ -H "x-api-key: $ANGHAMI_API_KEY" | jq '.sections[0]' ``` -------------------------------- ### GetApiKey OpenAPI Definition Source: https://docs.sdk.anghami.com/api-reference/developerservice/getapikey Defines the GET /v1/developer/keys/{id} endpoint and the associated response schemas. ```yaml openapi: 3.1.0 info: title: Anghami + OSN+ SDK description: >- Unified OpenAPI bundle covering all Anghami + OSN+ SDK services (music + video streaming). contact: name: Anghami Developer Platform email: developers@anghami.com version: 1.0.0 servers: - url: https://sdk.anghami.com security: [] paths: /v1/developer/keys/{id}: get: tags: - DeveloperService summary: GetApiKey description: |- GetApiKey retrieves a single API key by ID. The full secret is never returned — only the key_prefix is visible. operationId: GetApiKey parameters: - name: Authorization in: header description: >- OAuth 2.0 Bearer token. Required for all key management operations. Format: Bearer . required: true schema: type: string example: Bearer eyJhbGciOiJSUzI1NiIs... - name: id in: path description: Unique identifier of the API key to retrieve. required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: $ref: '#/components/schemas/sdk_developer_v1_GetApiKeyResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ValidationError' default: description: Error response content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: sdk_developer_v1_GetApiKeyResponse: type: object properties: apiKey: $ref: '#/components/schemas/sdk_developer_v1_ApiKey' description: >- GetApiKeyResponse is the response message containing the API key details. The full secret is never returned — only the key_prefix is visible. ValidationError: type: object properties: violations: type: array items: $ref: '#/components/schemas/FieldViolation' description: List of validation violations required: - violations description: >- ValidationError is returned when request validation fails. It contains a list of field violations describing what went wrong. Error: type: object properties: message: type: string description: Error message (e.g., 'user not found', 'database connection failed') description: >- Error is returned when a handler encounters an error. It contains a simple error message that the developer can customize. sdk_developer_v1_ApiKey: type: object properties: id: type: string description: Unique identifier for the API key. name: type: string description: >- Developer-assigned label for identification (e.g. "Production", "Staging"). keyPrefix: type: string description: |- Visible prefix for identification (e.g. "ang_live_abc"). The full key is never returned after initial creation. status: type: string enum: - API_KEY_STATUS_UNSPECIFIED - API_KEY_STATUS_ACTIVE - API_KEY_STATUS_REVOKED description: ApiKeyStatus represents the lifecycle state of an API key. scopes: type: array items: type: string description: >- Granted permission scopes for this key. Valid values: "read", "stream". createdAt: type: string description: ISO 8601 timestamp of when the key was created. lastUsedAt: type: string description: |- ISO 8601 timestamp of when the key was last used for authentication. Empty if the key has never been used. expiresAt: type: string description: |- ISO 8601 timestamp of when the key expires. Empty if the key does not expire. description: >- ApiKey represents a developer API key used for server-to-server authentication. API keys are passed in the x-api-key HTTP header and are billed per key. The full secret is only returned on creation and rotation. FieldViolation: ```