Guide

Authentication

Protected API V2 endpoints take a short-lived access token issued by API V2's own authorization system, sent as a bearer token.

API V2 sign-in is not available yet

No API V2 access token can be obtained today, so protected endpoints cannot be used yet. A request with a token currently receives an error, see What happens today. Sign-in, application registration and access scopes are being designed and are not promised for any date.

API V1 credentials do not work with API V2

API V2 is independent of API V1. Tokens, developer keys and registered applications of API V1 are not accepted by API V2 and keep serving API V1 only. Existing applications continue to use API V1 until they are migrated (see the API V1 documentation).

How API V2 authentication works

An API V2 access token is a bearer token with these properties:

Treat a token as an opaque string and never parse it in your application.

Using an access token

Send the token in the Authorization header of requests to a protected endpoint:

curl https://apiv2.virtualperformancetool.com/v2/me \
  -H "Authorization: Bearer $VPT_TOKEN"

GET /v2/me describes the token it receives: the user, the application, the granted scopes and the expiry. GET /v2/health and GET /v2/openapi.json need no token. Protected endpoints are marked as requiring authentication in the API reference.

What happens today

Because sign-in does not exist yet, the answers you can see are:

RequestStatusError code
Protected endpoint without a token401authentication_required
Protected endpoint with any token503authentication_unavailable

Once API V2 authentication is available, a token that is not a valid API V2 access token, including any API V1 token or developer key, receives 401 with invalid_token. See Errors for the full list and what to do about each.

Developer access

How applications are registered, how users authorize them and which scopes and data detail an application can receive are being designed for API V2. Nothing is available yet: there is no registration, no application credentials and no authorization page. This page will describe each of them when it is implemented.

Keeping tokens safe