Quickstart
Get from credentials to a live response in under five minutes using only cURL.
1. Get your credentials
The API credentials are generated by the ArzaMed equipe administrator from Settings → Equipe → Scroll down to API Key. They will share with you:
client_id— the public identifier for your integrationclient_secret— the secret used to obtain access tokens
Treat your client_secret like a password. Never include it in client-side code, mobile apps, or public repositories. Store it in an environment variable or secrets manager.
2. Get an access token
Exchange your credentials for a short-lived bearer token using the OAuth2 client credentials grant. The token URL is the same for every key: https://arzamed-domain.auth.eu-west-1.amazoncognito.com/oauth2/token. For the sandbox, see Authentication.
curl -X POST "https://arzamed-domain.auth.eu-west-1.amazoncognito.com/oauth2/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \ -d "grant_type=client_credentials&scope=https://api.platform.arzamed.com/read%20https://api.platform.arzamed.com/write"
A successful response returns the bearer token and its expiry:
{
"access_token": "eyJraWQiOiJrZXktaWQiLCJhbGciOiJSUzI1NiJ9...",
"token_type": "Bearer",
"expires_in": 3600
}
The token is valid for one hour. Cache it and re-request when it expires. See Authentication for details.
3. Make your first API call
List the active practitioners for the equipe. Pass the token in the Authorization header:
curl https://api.platform.arzamed.com/api/v1/practitioners \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
[
{
"name": "Dr. Marco Bianchi",
"profileImage": "https://assets.arzamed.com/photos/a1b2c3.jpg"
},
{
"name": "Dr. Sofia Ricci",
"profileImage": "https://assets.arzamed.com/photos/d4e5f6.jpg"
}
]
You do not pass an equipe ID in the URL. The API resolves which equipe your token belongs to automatically. Your credentials can only access the equipe that issued them.
4. Try it in code
The same flow in two common backend languages.
Node.js
const params = new URLSearchParams({ grant_type: "client_credentials", scope: "https://api.platform.arzamed.com/read https://api.platform.arzamed.com/write", }); const tokenRes = await fetch(process.env.ARZAMED_TOKEN_URL, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded", Authorization: "Basic " + btoa( process.env.ARZAMED_CLIENT_ID + ":" + process.env.ARZAMED_CLIENT_SECRET ), }, body: params, }); const { access_token } = await tokenRes.json(); const res = await fetch("https://api.platform.arzamed.com/api/v1/practitioners", { headers: { Authorization: `Bearer ${access_token}` }, }); const practitioners = await res.json(); console.log(practitioners);
Python
import os, requests token_res = requests.post( os.environ["ARZAMED_TOKEN_URL"], data={ "grant_type": "client_credentials", "scope": "https://api.platform.arzamed.com/read https://api.platform.arzamed.com/write", }, auth=(os.environ["ARZAMED_CLIENT_ID"], os.environ["ARZAMED_CLIENT_SECRET"]), ) access_token = token_res.json()["access_token"] practitioners = requests.get( "https://api.platform.arzamed.com/api/v1/practitioners", headers={"Authorization": f"Bearer {access_token}"}, ).json() print(practitioners)
You're authenticated and reading live data. Next, read the full Authentication page to understand token caching and error handling, or go straight to the Practitioners endpoint reference.