Skip to main content

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.

Listing and CRUD endpoints are identity-tier: the SDK sends your stored refresh token. You typically call these after sign-in, even before a user has tapped “who’s watching” (for example creating the first profile on an empty account). Forms that edit display name and avatarUrl mirror what’s stored on Discovr. One possible create/edit layout—yours can differ.
Light theme create or edit profile screen: name field, avatar preview, and save pattern for persisting avatarUrl (image or MP4 URL) via createProfile or updateProfile.

Profile avatars

The avatarUrl field is a plain URL string. You decide what hosts it—it can reference a still image, an animated image, or an MP4 (including short looping video commonly returned beside GIF APIs). Discovr does not normalize or transcode the asset after save. Your client must be able to render whichever kind of URL your user picked wherever you show profile portraits (pickers, nav chips, previews): decode bitmaps for typical image URLs and play MP4/video URLs when stored. Mixed households will have mixed URL types unless you constrain the picker UX. Suggested Discovr helpers (you can still paste any other HTTPS URL):
  • getProfileImages() — Public list of curated default avatar image URLs hosted by Discovr; good baseline set with no attribution requirements.
  • searchGifs() — Tenor-backed GIF search; results include url pointers to GIF and/or MP4 media (see SDK types). Include Tenor attribution wherever you surface those results—the searchGifs() reference summarizes requirements and links Tenor docs.
Filtering or tagging sources for your picker (for example substring search across filenames vs Tenor queries) stays entirely in your app—those endpoints return lists your UI can combine or prioritize as you prefer.

Create a profile

createProfile(name, avatarUrl) requires both fields. The user’s choice can be any URL your app allows to save (image and/or MP4). Many apps mix getProfileImages() (defaults) and searchGifs() (user search) in one picker; others add upload-to-your-CDN flows and pass that URL.

Steps

1

Source candidate avatar URLs

Typical pattern: call getProfileImages() for Discovr defaults; optionally call searchGifs() with the user’s query for Tenor results (respect Tenor attribution). Merge with any custom URLs you offer. Subset or filter in your UI as needed.
2

Collect name + chosen URL

Validate name. Persist the chosen media URL as avatarUrl—ensure your preview and list cells can render both image and MP4 URLs if you allow both.
3

Persist

Call createProfile(). Use the returned profileId when routing to selectProfile() or inviting the user back to Listing and selecting profiles.
const { images } = await client.getProfileImages();
const avatarUrl = images[0]; // user’s pick from your picker

const { profileId } = await client.createProfile("Alex", avatarUrl);
await client.selectProfile(profileId);

Read one profile for editing

getProfile(profileId) fills your form defaults before update.
const profile = await client.getProfile("profile_abc123xyz");
console.log(profile.name, profile.avatarUrl);

Update a profile

updateProfile(profileId, { name?, avatarUrl? }) requires at least one of name or avatarUrl.
await client.updateProfile("profile_abc123xyz", {
	name: "Alex R.",
});

Delete a profile

deleteProfile(profileId) permanently removes lists and playback data for that profile.
You cannot delete the last remaining profile—the API responds with 400. Plan an empty-account flow or retention rule before exposing delete.
If the deleted profile matches getActiveProfileId(), your session may no longer line up with a valid viewer. Navigate back to Listing and selecting profiles and selectProfile() someone else—or create a replacement profile—before session-tier browsing.
await client.deleteProfile("profile_to_remove");
getProfiles() · getProfile() · createProfile() · updateProfile() · deleteProfile() · getProfileImages() · searchGifs()
Next: Listing and selecting profiles · Sessions, Profiles & Sign Out