Find an API

Search public APIs with auth details & Postman guides

← All APIs

NPR Authorization Service

npr · Media

Media No Auth Free & Open entertainment

The interface to our OAuth2 server

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

POST Initiate an OAuth2 login flow for limited input devices

This flow should only be used by clients who cannot show a native webview or do not have advanced input controls. It is an alternative to `GET /v2/authorize`. Third-party clients will need to use one or the other of these two endpoints, but they will generally not use both.

https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/device

Hover any highlighted part to learn what it does

curl -X POST "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/device"
import requests
response = requests.post(
    "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/device",
)
print(response.json())
const url = 'https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/device';

const response = await fetch(url, {
  method: 'POST',
}); 
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/authorization/2/v2/device"
	req, _ := http.NewRequest("POST", targetURL, nil)

	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/authorization/2/v2/device")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/device";
$opts = ["http" => [
    "method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST Create a new OAuth2 access token

Please be aware that the required parameters are contingent on the `grant_type` that you select. For the `authorization_code` grant type, you are **required** to pass in the `code` and `redirect_uri` parameters. `service`, `username` and `password` parameters will be ignored. For the `client_crede

https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token

Hover any highlighted part to learn what it does

curl -X POST "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token"
import requests
response = requests.post(
    "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token",
)
print(response.json())
const url = 'https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token';

const response = await fetch(url, {
  method: 'POST',
}); 
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/authorization/2/v2/token"
	req, _ := http.NewRequest("POST", targetURL, nil)

	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/authorization/2/v2/token")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Post.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token";
$opts = ["http" => [
    "method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
POST Revoke an existing OAuth2 access token

Our implementation follows the proposed IETF specification [RFC-7009](https://tools.ietf.org/html/rfc7009). If your client application offers the ability to for a logged-in user to log out, and you have access to a long-lived `client_credentials` token (i.e. you have generated one that you are stor

https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token/revoke

Hover any highlighted part to learn what it does

Headers — extra info sent with the request
Authorization example
curl -X POST "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token/revoke" \
  -H "Authorization: example"
import requests
headers = {
    "Authorization": "example"
}
response = requests.post(
    "https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token/revoke",
    headers=headers,
)
print(response.json())
const url = 'https://api.apis.guru/v2/specs/npr.org/authorization/2/v2/token/revoke';

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/authorization/2/v2/token/revoke"
	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/authorization/2/v2/token/revoke")

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/authorization/2/v2/token/revoke";
$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

Get Postman ↗
  1. See official documentation for authentication and setup.

What can you build with NPR Authorization Service?

NPR Authorization 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 Authorization Service is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗