Npr Identity
NPR Identity is an API service for managing user identity and account information for NPR digital products.
- Base URL:
https://identity.api.npr.org - Auth: OAuth 2.0 (user-delegated) — attach an InTouch
oauthcredential. Mint one withitcli.py /oauth <provider>(device-code) or/google-auth(Google); the server auto-refreshes the access token before each run, so the connector never handles or stores tokens.
Operations
getuser— GET /v2/user — Get the latest state information about the logged-in userpostfollowing— POST /v2/following — Update the following status of the logged-in user for a particular aggregationupdatestations— PUT /v2/stations — Update the logged-in user's favorite station(s)deleteuser— DELETE /v2/user — Delete the user's accountinheritfromtempuser— POST /v2/user/inherit — Copy listening data from a temporary user account to the logged-in user's account
Inputs
- a linked
oauthcredential (no key inputs) — the server injects a freshAuthorization: Bearerfrom it operation— one of the operations above- path parameters when an operation's path contains
{...} query— optional JSON object of query paramsbody— JSON object for create/update ops
Example
operation: getuser
# (attach an 'oauth' credential to the task — no inline secrets)
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
erroroperationresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
operation |
string | yes | — | One of: getuser, postfollowing, updatestations, deleteuser, inheritfromtempuser |
query |
string | no | — | Optional query params as a JSON object string, e.g. {"limit": 10}. |
body |
string | no | — | Request body as a JSON object string (for create/update operations). |