NPR Identity Service
npr · Media
The entry point to user-specific information
Authentication
Sample Requests
After a successful login, the client should send a `GET` call approximately once an hour to refresh the user data.
Hover any highlighted part to learn what it does
| Authorization | example |
curl -X GET "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user" \ -H "Authorization: example"
import requests
headers = {
"Authorization": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user",
headers=headers,
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user';
const response = await fetch(url, {
headers: {
'Authorization': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Authorization", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Authorization: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));This 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 default, and will not need this endpoint.
Hover any highlighted part to learn what it does
| Authorization | example |
curl -X POST "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit?temp_user=1" \ -H "Authorization: example"
import requests
params = {
"temp_user": "1"
}
headers = {
"Authorization": "example"
}
response = requests.post(
"https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit');
url.searchParams.set('temp_user', '1');
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit")
q := baseURL.Query()
q.Set("temp_user", "1")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("Authorization", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit")
uri.query = URI.encode_www_form({
"temp_user" => "1"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/user/inherit?" . http_build_query([
"temp_user" => "1"
]);
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Authorization: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));After a successful call, this returns a User document with an updated list of affiliations.
Hover any highlighted part to learn what it does
| Authorization | example |
curl -X POST "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following" \ -H "Authorization: example"
import requests
headers = {
"Authorization": "example"
}
response = requests.post(
"https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following",
headers=headers,
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following';
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following"
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("Authorization", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/npr.org/identity/2/v2/following";
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Authorization: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with NPR Identity Service?
NPR Identity Service is a Media API. Developers commonly use media APIs for:
- storing and delivering images, video, and audio
- building digital asset management and media libraries
- transcoding and optimising media for the web
- adding video streaming and playback to your app
- automating content tagging and metadata extraction
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. NPR Identity Service is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide