This flow authenticates your app, not an end user, so there’s no OAuth redirect or login screen. Nango signs a short-lived JWT with your private key using
RS384, and athenahealth verifies it against the public key you register. The private key must be an RSA key.1
Register your app with athenahealth
Register your app in the athenahealth Developer Portal for 2-legged OAuth (client credentials). athenahealth issues separate apps for preview and production, each with its own Client ID.
2
Generate an RSA key pair
privatekey.pem secret. You’ll paste its contents into Nango in a later step.3
Register your public key as a JWKS
Convert your public key to JWK format and register it on your app, either by importing the JWKS or by hosting it at a public URL you control. Give the key a unique
kid (key ID). You’ll need this exact value in Nango.Register the JWKS on every app you use: preview and production are separate apps, and an app without a JWKS rejects the token request.4
Enter your credentials in Nango
- In Nango, go to Integrations → your athenahealth (JWKS) integration → Settings tab.
- Enter:
- Client ID: your app’s Client ID.
- Key ID: the
kidfrom your JWKS entry. - Private Key: the full contents of
privatekey.pem. - Scope: the space-separated scopes granted to your app, in SMART v2 format (e.g.
system/Patient.r). athenahealth has no default scopes, so this is required, and requesting a scope your app isn’t granted fails the whole token request.
5
Next
Follow the connect guide to create a connection for your first practice.