Auth Playground API

A simulated OAuth 2.0 authorization server. Practice the client-credentials and authorization-code grants, token expiry, refresh tokens, and the standard invalid_client / invalid_grant error shapes — independent of the qa-admin-token / qa-viewer-token used elsewhere on this site. The "real tokens" tag issues actual JWTs: an HS256 token from /login, or a Firebase Auth ID token with a role custom claim from /firebase-token — both work on every 🔒 endpoint across this site.

Base URL: https://funapi.dev/api/auth/v1 · 6 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.

oauth

client demo-client / secret demo-secret

real tokens

JWTs that actually work on the 🔒 endpoints site-wide

The Auth Playground issues real, verifiable tokens over genuine OAuth 2.0 flows — client credentials and authorization code, plus refresh and deliberate expiry. Nothing here is a stub: the tokens are signed, they expire on schedule, and an expired one is rejected. It is the page for testing what your client does when a token dies mid-session, which is the failure most integrations never rehearse.

What you can practise here

Practise 401 and 403 responses with demo roles, then explore OAuth token flows.

Example request and response

GET https://funapi.dev/api/auth/v1/oauth/protected-resource — A resource protected by a token from this flow (not the site-wide Authorize button). No token, no signup:

curl -i https://funapi.dev/api/auth/v1/oauth/protected-resource

Response: 401 Unauthorized

{
  "error": "invalid_token",
  "message": "Missing or malformed Authorization header. Expected \"Bearer <access_token>\"."
}

Open and run this endpoint

All 55 mock REST APIs

Use this response elsewhere

Last updated