Apps

Register a third-party app

Registers an app for "Sign in with PeridotID" and returns its public `client_id`. Pass just a name — allowed origins are managed after via PATCH (the exact return URL is passed in code at login time). Authenticated — the caller becomes the app owner.

POST
/apps

Registers an app for "Sign in with PeridotID" and returns its public client_id. Pass just a name — allowed origins are managed after via PATCH (the exact return URL is passed in code at login time). Authenticated — the caller becomes the app owner.

Authorization

cookieAuth
pid_access<token>

JWT access token set by /auth/google/callback or /auth/refresh

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/apps" \  -H "Content-Type: application/json" \  -d '{    "name": "My Game"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "clientId": "pidapp_0123456789abcdef0123456789abcdef",  "ownerId": "string",  "name": "string",  "allowedOrigins": [    "string"  ],  "isActive": true,  "clientSecretPrefix": "string",  "clientSecretCreatedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}