Npr

NPR Identity Service

The entry point to user-specific information

Media & content#openapi#entertainment

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The entry point to user-specific information

Endpoints 5

identity

  • POSTUpdate the following status of the logged-in user for a particular aggregation/v2/followingAfter a successful call, this returns a User document with an updated list of affiliations.
  • PUTUpdate the logged-in user's favorite station(s)/v2/stationsRight now, only the primary station can be changed. Previously selected stations will not be deleted, but the new station will be moved to first in the array.
  • GETGet the latest state information about the logged-in user/v2/userAfter a successful login, the client should send a GET call approximately once an hour to refresh the user data.
  • DELETEDelete the user's account/v2/userUse with caution as some steps are irreverisble. Initiates the user account deletion process, including removal of all user PII and account access.
  • POSTCopy listening data from a temporary user account to the logged-in user's account/v2/user/inherit?temp_user=0This can and should only be used by clients who have access to the temporary_user grant type. Third-party developers do not have access to this grant type by…

API details

Base URL
https://identity.api.npr.org
Authentication
OAuth 2.0 (authorization code flow) with 5 scopes
Operations
5 operations on 4 pathsPOST 2GET 1PUT 1DELETE 1
Main resources
identity 5
Response formats
application/json application/vnd.collection.doc+json
Description format
Swagger 2.0, API version 2
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the NPR Identity Service in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the NPR Identity Service collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 5 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Update the following status of the logged-in user for a particular aggregation” (POST /v2/following), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the NPR Identity Service?

The entry point to user-specific information It is listed under Media & content and has 5 endpoints.

Who publishes the NPR Identity Service?

It is listed from Npr's public API description (an OpenAPI document), not published by Npr on Swastik Codes. Anyone who controls npr.org can claim the profile by adding a DNS TXT record.

What is the base URL of the NPR Identity Service?

Requests go to https://identity.api.npr.org. Endpoint paths are added to this base URL.

How do I authenticate with the NPR Identity Service?

With OAuth 2.0 (authorization code flow) with 5 scopes.

How many endpoints does the NPR Identity Service have?

5 operations on 4 paths (2 POST, 1 GET, 1 PUT, 1 DELETE). The largest groups are identity.

Is forking the NPR Identity Service free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.