You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use provider lifecycle APIs when the identity source itself needs to be created, updated, or removed.
381
+
382
+
Preferred MCP tool path:
383
+
384
+
-`queryAppAuth(action="listProviders")`
385
+
-`queryAppAuth(action="getProvider")`
386
+
-`manageAppAuth(action="addProvider")`
387
+
-`manageAppAuth(action="updateProvider")`
388
+
-`manageAppAuth(action="deleteProvider")`
389
+
390
+
Guidance:
391
+
392
+
- Use `addProvider` when the provider record does not exist yet and you need to create it with `providerType`, optional `providerId`, `displayName`, and `config`.
393
+
- Use `updateProvider` when the provider already exists and only its configuration or enablement state needs to change.
394
+
- Use `deleteProvider` when the provider must be removed entirely instead of only disabling it.
395
+
396
+
### 9. Client Configuration Boundary
379
397
380
398
Use client APIs for client metadata and token/session settings. Do not use them as a replacement for login strategy or provider management.
381
399
@@ -410,14 +428,20 @@ Both tools should default to the current selected environment's default client.
410
428
}
411
429
```
412
430
413
-
### 9. Get Publishable Key
431
+
### 10. Publishable Key and API Key Boundary
414
432
415
433
Preferred MCP tool path:
416
434
417
435
-`queryAppAuth(action="getPublishableKey")`
418
436
-`manageAppAuth(action="ensurePublishableKey")`
437
+
-`queryAppAuth(action="listApiKeys")`
438
+
-`manageAppAuth(action="createApiKey")`
439
+
-`manageAppAuth(action="deleteApiKey")`
440
+
441
+
Use the shortcut pair `getPublishableKey` / `ensurePublishableKey` for the most common frontend-readiness flow.
442
+
Use the generic API key lifecycle actions when you need inventory, pagination, non-publishable keys, or explicit deletion.
`queryAppAuth(action="getPublishableKey")` should always force `KeyType="publish_key"` and return a short payload with `publishableKey`, `keyId`, `keyName`, `expireAt`, and `createdAt`.
429
453
430
-
**Ensure key exists**:
454
+
**List API keys**:
455
+
```json
456
+
{
457
+
"action": "listApiKeys",
458
+
"keyType": "api_key",
459
+
"pageNumber": 1,
460
+
"pageSize": 20
461
+
}
462
+
```
463
+
Use `listApiKeys` for a general key inventory view. It supports optional `keyType`, `pageNumber`, and `pageSize`.
`manageAppAuth(action="ensurePublishableKey")` should first query the existing `publish_key`; if one already exists, return it directly; otherwise create it and return the new key. This keeps the MCP interface short and avoids requiring the model to reason about `KeyType` or whether a key already exists.
439
474
475
+
**Create a generic API key**:
476
+
```json
477
+
{
478
+
"action": "createApiKey",
479
+
"keyType": "api_key",
480
+
"keyName": "server-prod",
481
+
"expireIn": 86400
482
+
}
483
+
```
484
+
`createApiKey` defaults to `publish_key` when `keyType` is omitted, but it can also create `api_key` for generic service-side access.
485
+
486
+
**Delete an API key**:
487
+
```json
488
+
{
489
+
"action": "deleteApiKey",
490
+
"keyId": "api-key-id"
491
+
}
492
+
```
493
+
Use `deleteApiKey` only when you intentionally want to revoke that key token.
494
+
440
495
If creation fails, direct user to: "https://tcb.cloud.tencent.com/dev?envId=`env`#/env/apikey"
0 commit comments