Interface: CreateApiKeyOptions
Gala Launchpad SDK 9.0.0-rc.5 / index / CreateApiKeyOptions
Interface: CreateApiKeyOptions
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:123
Options for creating a new API key.
Example
const options: CreateApiKeyOptions = {
role: 'MODERATOR',
description: 'Chat moderation bot',
delegateAllTokens: false,
tokenNames: ['mytoken', 'othertoken'],
expiresAt: '2025-12-31T23:59:59Z'
};
Properties
delegateAllTokens?
optionaldelegateAllTokens?:boolean
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:139
If true, key has access to ALL tokens owned by the user (current and future).
If false, only tokens in tokenNames are accessible.
Default
false
description?
optionaldescription?:string
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:133
User's description/label for this API key. Max 255 characters.
expiresAt?
optionalexpiresAt?:string
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:151
Optional expiration date in ISO 8601 format. If not provided, key never expires.
Example
"2025-12-31T23:59:59Z"
role
role:
ApiKeyRole
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:128
Role determining permissions for this API key. Required.
tokenNames?
optionaltokenNames?:string[]
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:145
Specific tokens to delegate access to.
Ignored if delegateAllTokens is true.
Token names are case-insensitive.
tokenPermissions?
optionaltokenPermissions?:Record<string,Permission[]>
Defined in: packages/launchpad-sdk/dist/types/api-key.dto.d.ts:160
Per-token permission overrides. Maps tokenName to Permission[]. Only applies to tokens in tokenNames. Tokens not in this map use the API key's role-based default permissions.
Example
{ "mytoken": ["MANAGE_COMMUNITY"] }
Since
5.8.0