This walkthrough takes you from zero to a working playback URL.Documentation Index
Fetch the complete documentation index at: https://docs.sdk.anghami.com/llms.txt
Use this file to discover all available pages before exploring further.
1. Get credentials
You need either an API key (server-to-server) or an OAuth access token (user-scoped).- API key — register at the Developer Portal, create a key in the dashboard, and copy the secret (shown once).
- OAuth — use the standard OAuth 2.0 Authorization Code + PKCE flow. See Authentication.
2. Browse the catalog
Hit a public catalog endpoint with your API key. Reads areGET:
GET; batch reads (:batchGet) and stream acquisition are POST with a JSON body.
3. Search for a song
Content wrappers — a generic envelope with a typed oneof id and display fields.
4. Acquire a stream
Stream acquisition requires an OAuth access token with thestream scope — this is the billable event. With a valid token:
5. Generate a typed client
Every release ships clients in the languages we support — pull them directly from the repo:| Language | Package |
|---|---|
| Go | github.com/anghami/sdk/api |
| TypeScript | @anghami/sdk |
| Swift | AnghamiSDK (SPM) |
| Java | com.anghami:anghami-sdk |
| Python | anghami-sdk |
Next
- Architecture — what the build pipeline produces and why.
- Usage / Authentication — full OAuth + PKCE walkthrough.
- Music Catalog — browse songs, albums, artists, lyrics.
- Streaming & Billing — what counts as a billable event.