Skip to content

Quickstart

Who runs the code Credential Where it comes from
You, for yourself: a script, a dashboard Personal key, rfk_… The app: Access and connected apps
Your app, for other members OAuth 2.1 with PKCE Register an app in the same screen
A TV, a console or a terminal Device code The member approves on getrefract.app/device

This page uses a personal key: it is the fastest way to a first answer.

In the Refract app, open Access and connected apps from the Integrations screen, then create a key. Pick the scopes your script needs: for this page, profile:read and library:read. The key starts with rfk_ and is shown once.

Every request sends the key as a bearer token. /v1/me needs the profile:read scope.

Terminal window
curl https://getrefract.app/v1/me \
-H "Authorization: Bearer $REFRACT_KEY"
{
"id": "3f2a9c4e-6b1d-4e8a-9c27-5d0b8e41f6a2",
"username": "florent",
"display_name": "Florent",
"avatar_url": "https://…",
"bio": null,
"country": "FR",
"locale": "fr",
"timezone": "Europe/Paris",
"profile_url": "https://getrefract.app/u/florent",
"created_at": "2025-02-03T21:14:09.120Z"
}

Filter the library by status. Pages hold 50 titles by default; follow next_cursor until has_more is false.

Terminal window
curl "https://getrefract.app/v1/library?status=in_progress" \
-H "Authorization: Bearer $REFRACT_KEY"
{
"data": [
{
"type": "show",
"is_anime": false,
"ids": { "refract": "8b0e5c1a-…", "tmdb": 95396, "imdb": "tt11280740", "tvdb": null },
"title": "Severance",
"original_title": "Severance",
"year": 2022,
"status": "in_progress",
"rewatch_count": 0,
"added_at": "2025-02-03T21:14:09.120Z",
"updated_at": "2026-10-27T20:41:55.120Z",
"progress": {
"watched_episodes": 13,
"last_watched": { "season": 2, "number": 4 },
"last_watched_at": "2026-10-27T20:40:00.000Z"
},
"revisit": null
}
],
"next_cursor": "eyJmIjoi…",
"has_more": true
}