Use the web sign-in flow for web apps, mobile web apps, and any platform with a browser. User sees a login popup (or redirects to login), enters credentials, and returns to your app with a refresh token.Documentation Index
Fetch the complete documentation index at: https://docs.discovr.media/llms.txt
Use this file to discover all available pages before exploring further.
Getting started
Initialize client
Create a
DiscovrClient with your client ID (from your dashboard or contact support).Call sign-in
Use
signInWithPopup() (popup) or
signInWithWebAuth() (redirect). Handle
the result.Verify sign-in
Check if
isSignedIn() is true. SDK stores
refresh token securely.Select a profile
Call
getProfiles(), let user pick one, then
selectProfile() with the chosen profile id.
This mints a session token.Ready to call API
Use
DiscovrClient methods like createPage(),
getRows(). SDK injects session token automatically.Code example
How it works

- Your app calls
signInWithPopup()orsignInWithWebAuth() - Discovr opens login UI (popup in browser or redirect)
- User enters email/password and authenticates
- Discovr returns to your app with authorization
- SDK exchanges authorization for refresh token
- Refresh token stored securely (Keychain, EncryptedSharedPreferences, or HttpOnly cookie depending on platform)
SDK stores refresh token securely and refreshes your session token every 30 minutes automatically.
You don’t touch either token.
Handling sign-in errors
- User cancels: User closes popup or goes back. Handle gracefully.
- Network error: No internet or timeout. Show retry button.
- Invalid credentials: User enters wrong email/password. SDK shows Discovr login UI, let user retry.
Advanced: Manual HTTP implementation
If building a custom client without the SDK, handle the OAuth flow manually:Related SDK reference
signInWithPopup · signInWithWebAuth · getProfiles · selectProfile · createPage · getRowsNext: Select a profile and understand sessions
