API Reference
Identity Platform
Applications

Applications API

Applications

ดู applications ทั้งหมด

GET /applications?limit=20
Authorization: Bearer <token>

Permission ที่ต้องการ: console.apps.read

ดู application

GET /applications/:slug
Authorization: Bearer <token>

สร้าง application

POST /applications
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "name": "string",
  "slug": "string",
  "description": "string"
}

Permission ที่ต้องการ: console.apps.write

แก้ไข application

PATCH /applications/:slug
Authorization: Bearer <token>
Content-Type: application/json
 
{ "name": "string", "description": "string" }

ลบ application

DELETE /applications/:slug
Authorization: Bearer <token>

OAuth Client

เชื่อม OAuth client

POST /applications/:slug/oauth-client
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "grantTypes": ["client_credentials"],
  "redirectUris": ["https://your-app.com/callback"],
  "scopes": ["openid", "profile"]
}

Response (client secret แสดงครั้งเดียว):

{
  "clientId": "client_xxxx",
  "clientSecret": "secret_xxxx"
}

ดูข้อมูล OAuth client

GET /applications/:slug/oauth-client
Authorization: Bearer <token>

API Keys

ดู API keys ทั้งหมด

GET /applications/:id/api-keys
Authorization: Bearer <token>

สร้าง API key

POST /applications/:id/api-keys
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "name": "string",
  "scopes": ["pip:read"],
  "expiresAt": "2027-01-01T00:00:00.000Z"
}

Response (token แสดงครั้งเดียว):

{
  "id": "key_xxxx",
  "name": "string",
  "token": "pip_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scopes": ["pip:read"],
  "expiresAt": "2027-01-01T00:00:00.000Z"
}

ยกเลิก API key

DELETE /applications/:id/api-keys/:keyId
Authorization: Bearer <token>

Applications API

Applications

List applications

GET /applications?limit=20
Authorization: Bearer <token>

Required permission: console.apps.read

Get application

GET /applications/:slug
Authorization: Bearer <token>

Create application

POST /applications
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "name": "string",
  "slug": "string",
  "description": "string"
}

Required permission: console.apps.write

Update application

PATCH /applications/:slug
Authorization: Bearer <token>
Content-Type: application/json
 
{ "name": "string", "description": "string" }

Delete application

DELETE /applications/:slug
Authorization: Bearer <token>

OAuth Client

Link OAuth client

POST /applications/:slug/oauth-client
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "grantTypes": ["client_credentials"],
  "redirectUris": ["https://your-app.com/callback"],
  "scopes": ["openid", "profile"]
}

Response (client secret shown once):

{
  "clientId": "client_xxxx",
  "clientSecret": "secret_xxxx"
}

Get OAuth client info

GET /applications/:slug/oauth-client
Authorization: Bearer <token>

API Keys

List API keys

GET /applications/:id/api-keys
Authorization: Bearer <token>

Create API key

POST /applications/:id/api-keys
Authorization: Bearer <token>
Content-Type: application/json
 
{
  "name": "string",
  "scopes": ["pip:read"],
  "expiresAt": "2027-01-01T00:00:00.000Z"
}

Response (token shown once):

{
  "id": "key_xxxx",
  "name": "string",
  "token": "pip_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "scopes": ["pip:read"],
  "expiresAt": "2027-01-01T00:00:00.000Z"
}

Revoke API key

DELETE /applications/:id/api-keys/:keyId
Authorization: Bearer <token>