App ID

Terminology

Application

A set of functionality provided by a common entity (the application owner), and perceived by the user as belonging together. For example, PayPal is an application that allows users to pay for stuff.

Facets

An (application) facet is how an application is implemented on various platforms. For example, the application PayPal may have an Android app, an iOS app, and a Web app. These are all facets of the PayPal application.

Facet ID

A platform-specific identifier (URI) for an application facet.

  • For the Web, the Facet ID is the web origin, written as a URI without a path (and therefore without a trailing slash). For example https://login.paypal.com.

  • For Android, the Facet ID is the URI android:apk-key-hash:<hash-of-apk-signing-cert>.

  • For iOS, the Facet ID is the URI ios:bundle-id:<ios-bundle-id-of-app>.

What should my AppID be?

The Application ID, or AppID, is a string that declares which facets that belong to this application.

Note
Web facets must use HTTPS, and either use a Top-level domain or have localhost as hostname.

Single-facet apps

If an app only has one facet the AppID can simply be the ID of that facet. For example:

https://example.com

Multi-facet apps

If an app has many facets the AppID should be an HTTPS URL that resolves to a JSON list of facet IDs. For example:

https://example.com/app-id.json

…which could resolve to the following JSON content:

{
  "trustedFacets" : [{
    "version": { "major": 1, "minor" : 0 },
    "ids": [
        "https://login.example.com",
        "https://secure.example.com",
        "android:apk-key-hash:585215fd5153209a7e246f53286035838a0be227"
    ]
  }]
}