Register an App
Before a user can authorize your client, you need an OAuth client. Register one per instance with the apps endpoint, which follows Mastodon's app-registration shape. The response contains your client_id and client_secret.
Request
curl -X POST https://loops.video/api/v1/apps \
-H "Content-Type: application/json" \
-d '{
"client_name": "My Loops Client",
"redirect_uris": "https://myapp.example/callback",
"scopes": "read write follow",
"website": "https://myapp.example"
}'Parameters
| Parameter | Type | Description |
|---|---|---|
client_namerequired | string | The display name of your application. |
redirect_urisrequired | string | Where to redirect after authorization. Use urn:ietf:wg:oauth:2.0:oob for out-of-band clients. |
scopes | string | Space-separated list of OAuth scopes. Defaults to "read". |
website | string | A URL to your application homepage. |
Response
{
"id": "1234",
"name": "My Loops Client",
"website": "https://myapp.example",
"redirect_uri": "https://myapp.example/callback",
"client_id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...",
"client_secret": "AAAAAAAAAAAAAAAAAAAAAAAA..."
} Keep your
client_secret server-side. For native and SPA clients that can't hold a secret, use the out-of-band redirect urn:ietf:wg:oauth:2.0:oob or PKCE.