Use a Service from Your App
This guide shows how to make authenticated API calls to Loop Platform services.
Who this is for
Developers who have installed the SDK and obtained an access token via the Connect with Loop OAuth flow.
Making a Request
Every SDK call passes the access token. The platform validates scopes before responding.
curl
curl -X GET https://api.platform.loop.health/identity/v1/me \
-H "Authorization: Bearer $ACCESS_TOKEN"Node.js
import { createClient } from "@platform/sdk";
const client = createClient({
baseUrl: "https://api.platform.loop.health",
token: accessToken,
});
const me = await client.identity.getMe();Python
from loop_platform import Client
client = Client(
base_url="https://api.platform.loop.health",
token=access_token,
)
me = client.identity.get_me()Error Handling
All SDK methods return structured errors. See Errors for the full error code reference.
const result = await client.identity.getMe();
if (!result.ok) {
console.error(`Error ${result.error.code}: ${result.error.message}`);
}Next Steps
- Handle Webhooks — Receive real-time events.
- API Reference — Browse all available endpoints.