Npr Authorization
NPR Authorization is an API service used to authorize access to NPR digital services and content integrations.
- Base URL:
https://authorization.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
generatedevicecode— POST /v2/device — Initiate an OAuth2 login flow for limited input devicescreatetoken— POST /v2/token — Create a new OAuth2 access tokenrevoketoken— POST /v2/token/revoke — Revoke an existing OAuth2 access token
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: generatedevicecode
# (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: generatedevicecode, createtoken, revoketoken |
body |
string | no | — | Request body as a JSON object string (for create/update operations). |
query |
string | no | — | Query-string parameters as a JSON object string, e.g. {"limit": 50}. Parsed and url-encoded onto the request. |