Overview

There are several ways to integrate with Passport and several APIs that may assist in developing an integration. This cookbook has various recipes to assist you. 

How to determine if a station is Passport-enabled

In order to determine if a member station is Passport-enabled you will need access to the Station API.

  1. If you do not have access to the Station API, request access here.  
  2. After obtaining your Basic Authentication credentials, hit the following endpoint: http://station.services.pbs.org/api/v1/stations/?call_sign=\{STATION CALLSIGN ALL CAPS\}

Example

The following call: http://station.services.pbs.org/api/v1/stations/?call_sign=KQED 

Returns the station object in the following JSON format. The data/attributes/passport_enabled value indicates the station's Passport-enabled status. 

JSON response
{
    "meta": {
        "sort": {
            "short_common_name": {
                "asc": "http://station.services.pbs.org/api/v1/stations/?sort=short_common_name",
                "desc": "http://station.services.pbs.org/api/v1/stations/?sort=-short_common_name"
            },
            "call_sign": {
                "asc": "http://station.services.pbs.org/api/v1/stations/?sort=call_sign",
                "desc": "http://station.services.pbs.org/api/v1/stations/?sort=-call_sign"
            }
        },
        "type": "collection",
        "filter": {
            "call_sign": "http://station.services.pbs.org/api/v1/stations/?call_sign="
        },
        "pagination": {
            "count": 1,
            "per_page": 25
        }
    },
    "links": {
        "first": null,
        "prev": null,
        "last": null,
        "next": null,
        "self": "http://station.services.pbs.org/api/v1/stations/?call_sign=KQED"
    },
    "jsonapi": {
        "version": "1.0"
    },
    "data": [
        {
            "id": "1978f5fc-903b-44c5-8db4-76335078ea74",
            "links": {
                "self": "http://station.services.pbs.org/api/v1/stations/1978f5fc-903b-44c5-8db4-76335078ea74/"
            },
            "attributes": {
                "call_sign": "KQED",
                "full_common_name": "KQED",
                "short_common_name": "KQED",
                "tvss_url": "",
                "donate_url": "https://www.kqed.org/controller/pledge?action=gateway&scid=36646",
                "website_url": "http://www.kqed.org",
                "facebook_url": "",
                "twitter_url": "",
                "station_kids_url": "",
                "passport_url": "",
                "telephone": "(415) 864-2000",
                "fax": "(415) 553-2380",
                "pdp": false,
                "city": "San Francisco",
                "state": "CA",
                "address_line_1": "2601 Mariposa Street",
                "address_line_2": "",
                "zip_code": 94110,
                "email": "",
                "tag_line": "Public Broadcasting for Northern California",
                "passport_enabled": true,
                "primary_channel": "",
                "primetime_start": "8PM",
                "images": [
                    {
                        "profile": "black-logo",
                        "url": "http://image.pbs.org/stations/kqed-black-logo-im1srbU.png"
                    },
                    {
                        "profile": "white-logo",
                        "url": "http://image.pbs.org/stations/kqed-white-logo-2QhrqhA.png"
                    },
                    {
                        "profile": "color-logo",
                        "url": "http://image.pbs.org/stations/kqed-color-logo-PvUfsgf.png"
                    }
                ],
                "updated_at": "2015-10-19T14:10:45.117714Z"
            },
            "type": "station"
        }
    ]
}

How to find Passport-enabled content

You will need to use Media Manager to find and/or provide Passport-enabled video content. Learn about the Media Manager API

  1. If you don't already have access, request authorization keys for Media Manager.
  2. Read about how authorization works.
  3. Filtering Passport content uses Asset Availability
  4. The two main API parameters necessary for filtering Passport content are 'content_region' and 'audience.'

Setting up your own login/authentication for Passport

Passport requires the use of PBS Account for user logins.

PBS Account abides by the OAuth 2.0 standard for authentication. If you're familiar with this spec, great! If not, we recommend learning about it before attempting to implement PBS Account on your own, so that you are familiar with the workflow.

Once you're ready to go contact us and we will set you up as PBS Account consumer!