diff --git a/admin-api/authentication.mdx b/admin-api/authentication.mdx index 9fc846d..4741ced 100644 --- a/admin-api/authentication.mdx +++ b/admin-api/authentication.mdx @@ -1,15 +1,102 @@ --- title: Authentication -description: Integrate securely with the API using account-level API keys - transmitted in the `X-API-KEY` header. -og:description: Integrate securely with the Trophy API using account-level API +description: Integrate securely with the Admin API using account-level admin API keys transmitted in the `X-API-KEY` header. +og:description: Integrate securely with the Trophy Admin API using account-level + admin API keys transmitted in the `X-API-KEY` header. icon: key --- -The Trophy Admin API is authenticated using the same API keys as the [Application API](/api-reference/authentication). +import AdminApiAuthenticateRequestBlock from "../snippets/admin-api-authenticate-request-block.mdx"; +import ApplicationApiAuthenticateRequestBlock from "../snippets/application-api-authenticate-request-block.mdx"; + + + For client-side or end-user access to the Application API, create + [application API keys](/api-reference/authentication) scoped to a single user + instead. + + +## Admin API keys {#admin-api-keys} + +Admin API keys are account-level credentials with broad permissions. Use them to authenticate requests to the Admin API, and optionally to the [Application API](/api-reference/authentication) from trusted server-side environments. + +Every account can create a maximum of 3 admin API keys from the [integration page](https://app.trophy.so/integration) of the Trophy dashboard. + +Trophy keeps track of and displays when each admin API key in your account was created and when it was last used so you can easily keep track of usage. + + + + + + + Admin API keys can access any user and any admin operation in your account. + Never expose them in client-side code, mobile apps, or public repositories. + + +### Anatomy of an admin API key {#anatomy-of-an-admin-api-key} + +Each admin API key is made up of 2 parts separated by a period: + +```bash +{prefix}.{body} +``` + +- The _prefix_ is the first 8 characters. It's readable and will always stay the same so it's easily recognisable. +- The _body_ is the secret part, and is only shown to you once when you create the key. + + + When using the API, both parts of your admin API key must be sent in the + `X-API-KEY` header. + + +### Authenticating requests {#authenticating-requests} + +When making requests to the Admin API, include both parts of your admin API key in the `X-API-KEY` header, or pass it when initializing an SDK client: + + + +The same key authenticates Application API requests when you use an admin API key from a server-side environment: + + + +If you do not pass an API key, or your API key is invalid, you'll receive a `401` response code. + +## Managing admin API keys {#managing-admin-api-keys} + +There are a few different operations you can perform on admin API keys from within your Trophy dashboard to manage your integration. + + + + + +### Rotating keys {#rotating-keys} + +Admin API keys can be rotated if you want to change them for any reason. At the point of rotation, the original API key will no longer function and any requests still using it will begin receiving `401` responses immediately. + + + Note that when rotating keys, both the prefix and the body will change. + + +### Revoking keys {#revoking-keys} + +Admin API keys can also be revoked entirely at which point they become _Inactive_. At the point of revocation, the API key will no longer function and any requests still using it will begin receiving `401` responses immediately. + +Once revoked you can re-activate the API key at any time. + + + Neither the prefix or the body of the key change when revoked or re-activated. + + +### Deleting API keys {#deleting-api-keys} + +If you're 100% sure you no longer need an admin API key, they can be deleted. + +Once API keys are deleted, they cannot be recovered. ## Get Support {#get-support} Want to get in touch with the Trophy team? Reach out to us via [email](mailto:support@trophy.so). We're here to help! - diff --git a/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx b/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx new file mode 100644 index 0000000..ff8b7aa --- /dev/null +++ b/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx @@ -0,0 +1,10 @@ +--- +title: Create application API keys for users +openapi: openapi/admin.yml post /application-api-keys +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx b/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx new file mode 100644 index 0000000..d241633 --- /dev/null +++ b/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx @@ -0,0 +1,10 @@ +--- +title: Delete application API keys +openapi: openapi/admin.yml delete /application-api-keys +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Rate Limits** + + diff --git a/admin-api/introduction.mdx b/admin-api/introduction.mdx index d581555..f28ed98 100644 --- a/admin-api/introduction.mdx +++ b/admin-api/introduction.mdx @@ -26,7 +26,7 @@ Learn more about how to integrate with the Trophy Admin API below. - Securely integrate your applications with the Trophy Admin API. + Authenticate with account-level admin API keys. - - +| Key type | Scope | Where to use | Safe client-side? | +| --- | --- | --- | --- | +| [Application API keys](#application-api-keys) | Single user | Application API only | Yes | +| [Admin API keys](/admin-api/authentication) | Entire account | Application API and Admin API | No | -### Anatomy of an API key {#anatomy-of-an-api-key} +Use application API keys when you want end users or client apps to call the Application API with permissions limited to one user. Use [admin API keys](/admin-api/authentication) for trusted server-side integrations that need broad access. -Each API key is made up of 2 parts separated by a period: +## Application API keys {#application-api-keys} -```bash -{prefix}•{body} -``` +Application API keys are scoped to a specific user. Each key can only perform Application API operations on behalf of the user it was created for, which makes them safe to expose in client-side environments. -- The _prefix_ is the first 8 characters. It's readable and will always stay the same so it's easily recognisable. -- The _body_ is the secret part, and is only shown to you once when you create the key. +Application API keys cannot be used with the Admin API. - - When using the API, both parts of your API key must be sent in the `X-API-KEY` - header. - +### Creating application API keys {#creating-application-api-keys} -### Authenticating Requests {#authenticating-requests} +Create application API keys with the [Admin API](/admin-api/endpoints/application-api-keys/create-application-api-keys). You authenticate that request with an [admin API key](/admin-api/authentication). -When making requests to the API, make sure to include **both** parts of your API key in the `X-API-KEY` header as in this example: +You can create keys for up to 100 users per request. The full key value is returned once at creation time and cannot be retrieved again—store it securely or deliver it to the client immediately. -```bash -curl https://app.trophy.so/api/users//metrics/ \ - -H "X-API-KEY: ********.***********************" -``` + -If you do not pass an API key, or your API key is invalid, you'll receive a `401` response code. +A successful response includes the key ID (used later to delete the key), the user ID, the full key, and a readable prefix: -## Managing API keys {#managing-api-keys} +```json +{ + "created": [ + { + "id": "550e8400-e29b-41d4-a716-446655440000", + "userId": "user_123", + "key": "app_XXXXX.YOUR_API_KEY", + "prefix": "app_XXXXX" + } + ], + "issues": [] +} +``` -There are a few different operations you can perform on API keys from within your Trophy dashboard to manage your integration. +### Anatomy of an application API key {#anatomy-of-an-application-api-key} - - - +Each application API key is made up of 2 parts separated by a period: -### Rotating keys {#rotating-keys} +```bash +{prefix}.{body} +``` -API keys can be rotated if you want to change them for any reason. At the point of rotation, the original API key will no longer function and any requests still using it will begin receiving `401` responses immediately. +- The _prefix_ identifies the key (for example `app_XXXXX`) and is safe to log or display. +- The _body_ is the secret part, and is only shown once when you create the key. - Note that when rotating keys, both the prefix and the body will change. + When using the API, both parts of your application API key must be sent in the + `X-API-KEY` header. -### Revoking keys {#revoking-keys} +### Authenticating requests {#authenticating-requests} -API keys can also be revoked entirely at which point they become _Inactive_. At the point of revocation, the API key will no longer function and any requests still using it will begin receiving `401` responses immediately. +Include the full application API key in the `X-API-KEY` header on Application API requests, or pass it when initializing an SDK client. The key only authorizes operations for the user it is scoped to—requests for other users return an error. -Once revoked you can re-activate the API key at any time. + - - Neither the prefix or the body of the key change when revoked or re-activated. - +If you do not pass an API key, or your API key is invalid, you'll receive a `401` response code. + +### Deleting application API keys {#deleting-application-api-keys} -### Deleting API keys {#deleting-api-keys} +Delete application API keys by ID with the [Admin API](/admin-api/endpoints/application-api-keys/delete-application-api-keys). Use the UUID returned when the key was created. -If you're 100% sure you no longer need an API key, they can be deleted. + Once API keys are deleted, they cannot be recovered. diff --git a/api-reference/introduction.mdx b/api-reference/introduction.mdx index fcc73f0..935c28d 100644 --- a/api-reference/introduction.mdx +++ b/api-reference/introduction.mdx @@ -24,7 +24,7 @@ Learn more about how to integrate with the Trophy Application API below. - Securely integrate your applications with the Trophy API using API keys. + Authenticate with user-scoped application API keys or account-level admin API keys. | 10 req/s | -| | 100 req/s | +| | 5 req/s | +| | 50 req/s | If you feel you need a higher rate limit, then please [contact diff --git a/components/rate-limit-badge.jsx b/components/rate-limit-badge.jsx index 4ada2b3..ecfca86 100644 --- a/components/rate-limit-badge.jsx +++ b/components/rate-limit-badge.jsx @@ -13,9 +13,9 @@ export const RateLimitBadge = ({ tier, noTooltip = false }) => { const getLimit = (tier) => { switch (tier) { case 1: - return 10; + return 5; case 2: - return 100; + return 50; } }; diff --git a/docs.json b/docs.json index 9ea9fd8..9c3f0ea 100644 --- a/docs.json +++ b/docs.json @@ -301,6 +301,13 @@ "admin-api/endpoints/tenants/create-tenants", "admin-api/endpoints/tenants/delete-tenants" ] + }, + { + "group": "Application API Keys", + "pages": [ + "admin-api/endpoints/application-api-keys/create-application-api-keys", + "admin-api/endpoints/application-api-keys/delete-application-api-keys" + ] } ] }, diff --git a/es/admin-api/authentication.mdx b/es/admin-api/authentication.mdx index e8b3708..3515d7c 100644 --- a/es/admin-api/authentication.mdx +++ b/es/admin-api/authentication.mdx @@ -1,16 +1,104 @@ --- title: Autenticación -description: Integre de forma segura con la API utilizando claves API a nivel de - cuenta transmitidas en el encabezado +description: Integra de forma segura con la Admin API utilizando claves de API + de administrador a nivel de cuenta transmitidas en el encabezado `X-API-KEY`. -og:description: Integre de forma segura con la API de Trophy utilizando claves - API a nivel de cuenta transmitidas en el encabezado +og:description: Integra de forma segura con la Admin API de Trophy utilizando + claves de API de administrador a nivel de cuenta transmitidas en el encabezado `X-API-KEY`. icon: key --- -La API de administración de Trophy se autentica utilizando las mismas claves API que la [API de aplicación](/es/api-reference/authentication). +import AdminApiAuthenticateRequestBlock from "../../snippets/admin-api-authenticate-request-block.mdx"; +import ApplicationApiAuthenticateRequestBlock from "../../snippets/application-api-authenticate-request-block.mdx"; -## Obtener soporte {#get-support} + + Para acceso del lado del cliente o de usuarios finales a la Application API, crea + [claves de API de aplicación](/es/api-reference/authentication) con alcance limitado a un solo usuario + en su lugar. + -¿Quiere ponerse en contacto con el equipo de Trophy? Contáctenos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudar! +## Claves de API de administrador {#admin-api-keys} + +Las claves de API de administrador son credenciales a nivel de cuenta con permisos amplios. Úsalas para autenticar solicitudes a la Admin API y, opcionalmente, a la [Application API](/es/api-reference/authentication) desde entornos de servidor confiables. + +Cada cuenta puede crear un máximo de 3 claves de API de administrador desde la [página de integración](https://app.trophy.so/integration) del panel de Trophy. + +Trophy realiza un seguimiento y muestra cuándo se creó cada clave de API de administrador en tu cuenta y cuándo se usó por última vez, para que puedas supervisar fácilmente su uso. + + + + + + + Las claves de API de administrador pueden acceder a cualquier usuario y cualquier operación de administrador en tu cuenta. + Nunca las expongas en código del lado del cliente, aplicaciones móviles o repositorios públicos. + + +### Anatomía de una clave de API de administrador {#anatomy-of-an-admin-api-key} + +Cada clave de API de administrador está compuesta por 2 partes separadas por un punto: + +```bash +{prefix}.{body} +``` + +- El _prefijo_ son los primeros 8 caracteres. Es legible y siempre permanecerá igual, por lo que es fácilmente reconocible. +- El _cuerpo_ es la parte secreta y solo se te muestra una vez cuando creas la clave. + + + Al usar la API, ambas partes de tu clave de API de administrador deben enviarse en el + encabezado `X-API-KEY`. + + +### Autenticación de solicitudes {#authenticating-requests} + +Al realizar solicitudes al Admin API, incluye ambas partes de tu clave de admin API en el encabezado `X-API-KEY`, o pásala al inicializar un cliente SDK: + + + +La misma clave autentica las solicitudes del Application API cuando utilizas una clave de admin API desde un entorno del lado del servidor: + + + +Si no proporcionas una clave API o tu clave API no es válida, recibirás un código de respuesta `401`. + +## Administración de claves de admin API {#managing-admin-api-keys} + +Existen varias operaciones que puedes realizar sobre las claves de admin API desde tu panel de Trophy para gestionar tu integración. + + + + + +### Rotación de claves {#rotating-keys} + +Las claves de admin API pueden rotarse si deseas cambiarlas por cualquier motivo. En el momento de la rotación, la clave API original dejará de funcionar y cualquier solicitud que aún la utilice comenzará a recibir respuestas `401` de inmediato. + + + Ten en cuenta que al rotar claves, tanto el prefijo como el cuerpo cambiarán. + + +### Revocación de claves {#revoking-keys} + +Las claves de admin API también pueden revocarse por completo, momento en el cual pasan a estar _Inactivas_. En el momento de la revocación, la clave API dejará de funcionar y cualquier solicitud que aún la utilice comenzará a recibir respuestas `401` de inmediato. + +Una vez revocada, puedes reactivar la clave API en cualquier momento. + + + Ni el prefijo ni el cuerpo de la clave cambian cuando se revoca o se reactiva. + + +### Eliminación de claves API {#deleting-api-keys} + +Si estás 100% seguro de que ya no necesitas una clave de admin API, pueden eliminarse. + +Una vez que se eliminan las claves de API, no se pueden recuperar. + +## Obtener Soporte {#get-support} + +¿Quieres ponerte en contacto con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx b/es/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx new file mode 100644 index 0000000..113258f --- /dev/null +++ b/es/admin-api/endpoints/application-api-keys/create-application-api-keys.mdx @@ -0,0 +1,10 @@ +--- +title: Crear claves de API de aplicación para usuarios +openapi: openapi/admin.yml post /application-api-keys +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx b/es/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx new file mode 100644 index 0000000..642c8d6 --- /dev/null +++ b/es/admin-api/endpoints/application-api-keys/delete-application-api-keys.mdx @@ -0,0 +1,10 @@ +--- +title: Eliminar claves API de aplicación +openapi: openapi/admin.yml delete /application-api-keys +--- + +import { RateLimitBadge } from "../../../components/rate-limit-badge.jsx"; + +**Límites de velocidad** + + diff --git a/es/api-reference/authentication.mdx b/es/api-reference/authentication.mdx index e20e3ca..7bfebf4 100644 --- a/es/api-reference/authentication.mdx +++ b/es/api-reference/authentication.mdx @@ -1,86 +1,91 @@ --- title: Autenticación -description: Integre de forma segura con la API utilizando claves API a nivel de - cuenta transmitidas en el encabezado +description: Autentícate con la API de la aplicación usando claves de API de + aplicación con ámbito de usuario transmitidas en el encabezado `X-API-KEY`. -og:description: Integre de forma segura con la API de Trophy utilizando claves - API a nivel de cuenta transmitidas en el encabezado +og:description: Autentícate con la API de la aplicación Trophy usando claves de + API de aplicación con ámbito de usuario transmitidas en el encabezado `X-API-KEY`. icon: key --- -## Claves API {#api-keys} +import CreateApplicationApiKeysRequestBlock from "../../snippets/create-application-api-keys-request-block.mdx"; +import DeleteApplicationApiKeysRequestBlock from "../../snippets/delete-application-api-keys-request-block.mdx"; +import ApplicationApiAuthenticateRequestBlock from "../../snippets/application-api-authenticate-request-block.mdx"; -Cada cuenta puede crear un máximo de 3 claves API desde la [Página de Integración](https://app.trophy.so/integration). Si ya te has registrado, habrás creado una durante la incorporación. +## Tipos de clave de API {#api-key-types} -Trophy realiza un seguimiento y muestra cuándo se creó cada clave API en tu cuenta y cuándo se usó por última vez para que puedas rastrear fácilmente el uso. +La API de la aplicación acepta dos tipos de claves de API: - - - +| Tipo de clave | Ámbito | Dónde usar | ¿Segura del lado del cliente? | +| --- | --- | --- | --- | +| [Claves de API de aplicación](#application-api-keys) | Usuario individual | Solo API de la aplicación | Sí | +| [Claves de API de administrador](/es/admin-api/authentication) | Cuenta completa | API de la aplicación y API de administrador | No | -### Anatomía de una clave API {#anatomy-of-an-api-key} +Usa claves de API de aplicación cuando desees que los usuarios finales o las aplicaciones cliente llamen a la API de la aplicación con permisos limitados a un solo usuario. Usa [claves de API de administrador](/es/admin-api/authentication) para integraciones de servidor confiables que requieran acceso amplio. -Cada clave API está compuesta por 2 partes separadas por un punto: +## Claves de API de aplicación {#application-api-keys} -```bash -{prefix}•{body} -``` +Las claves de API de aplicación tienen ámbito de un usuario específico. Cada clave solo puede realizar operaciones de la API de la aplicación en nombre del usuario para el que fue creada, lo que las hace seguras para exponerlas en entornos del lado del cliente. -- El _prefijo_ son los primeros 8 caracteres. Es legible y siempre permanecerá igual para que sea fácilmente reconocible. -- El _cuerpo_ es la parte secreta y solo se te muestra una vez cuando creas la clave. +Las claves de API de aplicación no se pueden usar con la API de administrador. - - Al utilizar la API, ambas partes de tu clave API deben enviarse en el encabezado `X-API-KEY`. - +### Crear claves de API de aplicación {#creating-application-api-keys} -### Autenticación de Solicitudes {#authenticating-requests} +Crea claves de API de aplicación con la [API de administrador](/es/admin-api/endpoints/application-api-keys/create-application-api-keys). Autentícate en esa solicitud con una [clave de API de administrador](/es/admin-api/authentication). -Al realizar solicitudes a la API, asegúrate de incluir **ambas** partes de tu clave API en el encabezado `X-API-KEY` como en este ejemplo: +Puedes crear claves para hasta 100 usuarios por solicitud. El valor completo de la clave se devuelve una sola vez en el momento de la creación y no se puede recuperar nuevamente—guárdala de forma segura o entrégala al cliente de inmediato. -```bash -curl https://app.trophy.so/api/users//metrics/ \ - -H "X-API-KEY: ********.***********************" -``` + -Si no pasas una clave API o tu clave API no es válida, recibirás un código de respuesta `401`. +Una respuesta exitosa incluye el ID de la clave (utilizado posteriormente para eliminar la clave), el ID de usuario, la clave completa y un prefijo legible: -## Gestión de claves API {#managing-api-keys} +```json +{ + "created": [ + { + "id": "550e8400-e29b-41d4-a716-446655440000", + "userId": "user_123", + "key": "app_XXXXX.YOUR_API_KEY", + "prefix": "app_XXXXX" + } + ], + "issues": [] +} +``` -Existen varias operaciones diferentes que puedes realizar con las claves API desde tu panel de Trophy para gestionar tu integración. +### Anatomía de una clave de API de aplicación {#anatomy-of-an-application-api-key} - - - +Cada clave de API de aplicación se compone de 2 partes separadas por un punto: -### Rotación de claves {#rotating-keys} +```bash +{prefix}.{body} +``` -Las claves de API se pueden rotar si deseas cambiarlas por cualquier motivo. En el momento de la rotación, la clave de API original dejará de funcionar inmediatamente y cualquier solicitud que aún la utilice comenzará a recibir respuestas `401`. +- El _prefijo_ identifica la clave (por ejemplo `app_XXXXX`) y es seguro para registrar o mostrar. +- El _cuerpo_ es la parte secreta, y solo se muestra una vez cuando creas la clave. - Ten en cuenta que al rotar las claves, tanto el prefijo como el cuerpo cambiarán. + Al usar el API, ambas partes de tu clave de API de aplicación deben enviarse en el encabezado + `X-API-KEY`. -### Revocación de claves {#revoking-keys} +### Autenticación de solicitudes {#authenticating-requests} -Las claves de API también se pueden revocar por completo, momento en el cual pasan a estar _Inactivas_. En el momento de la revocación, la clave de API dejará de funcionar inmediatamente y cualquier solicitud que aún la utilice comenzará a recibir respuestas `401`. +Incluye la clave de API de aplicación completa en el encabezado `X-API-KEY` en las solicitudes del Application API, o pásala al inicializar un cliente SDK. La clave solo autoriza operaciones para el usuario al que está vinculada; las solicitudes para otros usuarios devuelven un error. -Una vez revocada, puedes reactivar la clave de API en cualquier momento. + - - Ni el prefijo ni el cuerpo de la clave cambian cuando se revoca o se reactiva. - +Si no proporcionas una clave de API, o tu clave de API no es válida, recibirás un código de respuesta `401`. + +### Eliminación de claves de API de aplicación {#deleting-application-api-keys} -### Eliminación de claves de API {#deleting-api-keys} +Elimina las claves de API de aplicación por ID con el [Admin API](/es/admin-api/endpoints/application-api-keys/delete-application-api-keys). Usa el UUID devuelto cuando se creó la clave. -Si estás 100% seguro de que ya no necesitas una clave de API, se pueden eliminar. + Una vez que las claves de API se eliminan, no se pueden recuperar. ## Obtener soporte {#get-support} -¿Quieres ponerte en contacto con el equipo de Trophy? Contáctanos por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! +¿Quieres ponerte en contacto con el equipo de Trophy? Comunícate con nosotros por [correo electrónico](mailto:support@trophy.so). ¡Estamos aquí para ayudarte! diff --git a/es/api-reference/rate-limiting.mdx b/es/api-reference/rate-limiting.mdx index 9fd01a3..05635b9 100644 --- a/es/api-reference/rate-limiting.mdx +++ b/es/api-reference/rate-limiting.mdx @@ -13,7 +13,7 @@ Trophy opera un modelo de Límite de solicitudes escalonado para cada endpoint d | Nivel | Límite de tasa | | ---- | ---------- | -| | 10 req/s | +| | 5 req/s | | | 100 req/s | diff --git a/es/components/rate-limit-badge.jsx b/es/components/rate-limit-badge.jsx index 97f1ba4..ad5405f 100644 --- a/es/components/rate-limit-badge.jsx +++ b/es/components/rate-limit-badge.jsx @@ -13,9 +13,9 @@ export const RateLimitBadge = ({ tier, noTooltip = false }) => { const getLimit = (tier) => { switch (tier) { case 1: - return 10; + return 5; case 2: - return 100; + return 50; } }; diff --git a/i18n.json b/i18n.json index 5b62f5c..ba5d286 100644 --- a/i18n.json +++ b/i18n.json @@ -18,6 +18,7 @@ "admin-api/endpoints/attributes/*.mdx", "admin-api/endpoints/leaderboards/*.mdx", "admin-api/endpoints/tenants/*.mdx", + "admin-api/endpoints/application-api-keys/*.mdx", "api-reference/*.mdx", "api-reference/endpoints/achievements/*.mdx", "api-reference/endpoints/leaderboards/*.mdx", diff --git a/i18n.lock b/i18n.lock index 43126c2..2bbf6b6 100644 --- a/i18n.lock +++ b/i18n.lock @@ -126,43 +126,44 @@ checksums: content/4: 3040f3c260f4640ba72d3827d9f21308 content/5: 661e97346571e3f16d7b8aaf91b7be9f content/6: 0d3b2ba4d21c8ae2997c8ac660674038 - content/7: 0942d9501d694751af4be357fd1717e3 + content/7: 5251828d3a1535f9559c8345dfaa4167 content/8: 8dc2a9d4eb6ccc9ef55db5a7169aa556 content/9: 10e8e9a59847ddd720c6d06b12c7b120 content/10: 9799b973234bf2d10d5c971b267f55a5 5eb7d6c7a406cce50046f8c2caa38b21: meta/title: 491fbb938cfe44df0438ad3e198d23e6 - meta/description: 9733b476e1c9f0a0a54474613ec212ca - meta/og%3Adescription: 521871c1114d4eb622b24fd17ec6b91a + meta/description: 2071a6d177ec2f4fd3d99b37ba28f428 + meta/og%3Adescription: 025a61db79782a4ced0106bd4b03d9f6 meta/icon: 36e4f21bf2ebca153bea0479669ef733 - content/0: 9fbfd1b5d36a01e93b9a268c69c9de0f - content/1: 664958ece77004bdfab7f1dc52055214 - content/2: 19046ec963c1043d7bd28e842da49ea8 - content/3: 5fb03047f9b4d0fd9ca76448a00c6f8f - content/4: 7e55819c57e35e3ce2000291f560a9a2 - content/5: 281fe056c53c9cdcc011b8e69b8e97c5 - content/6: 3e1c13496b9e55ccf7cf570116dce650 - content/7: 312086133369dd61e9855eca62e52ed3 - content/8: bc06ed4f58c8610405737299eec9c4a7 - content/9: 2e5174153960c2082d694fe1830447ad - content/10: f1dba5c8ebf3921b9c5be0707ffcb5b3 - content/11: a7e406278c424e311bc17a5a8703966e - content/12: 69d133e925de5885c17de21ec7b56d31 - content/13: a44e37a5fcdaafa79571d252b9101c9d - content/14: 57bc0df692270f59bc6bf17a25ffe5c4 - content/15: 658f395d7080e64888f93a39e33e392e - content/16: 7132d84494820c1ddc1aac42881c3bbc - content/17: c198b6fcd4804fe653923e4f466d054c - content/18: b00838381eaec9cb81eb7705b50ebf67 - content/19: 27ac13621212cc9aae5d9e510ff85ff3 - content/20: b03ad0bb70ef1c8f596516420ed243bb - content/21: e0c7db928e542553683df7dd1c682109 - content/22: 187c183027e81fd7105c0f6dd2632a23 - content/23: 533daf1115ed6d5da2d4891356164171 - content/24: f3cf31effdbc68ddfdd6ad109b70124e - content/25: 2a8bf3b9e6393acf30c92561b71c86b1 - content/26: 10e8e9a59847ddd720c6d06b12c7b120 - content/27: 9799b973234bf2d10d5c971b267f55a5 + content/0: a73d1bf69d63fe9e51d5c7945fda695a + content/1: c5a7bb2318ca8f9575618ffc7ed8089f + content/2: 4dc913be33d19c0c385a417a09afb181 + content/3: d2147a5f1db93bc6236e48a77715c2ad + content/4: bc650296b7cbf1e3e0e5307d446ca785 + content/5: 0947477a1e1e149d35abc21d159918be + content/6: c01e9dac6037a3d85a9897a4a8338d56 + content/7: cc7b7e41be557ea90094d978b8cc2dd6 + content/8: 5a6499baf0724311b741e375d6b5ce2f + content/9: 294d021a52eb5f464cd514a469ec36b0 + content/10: f6f84ea6a837685c8611848246194a53 + content/11: b168bba458463fa312b09ae2f45705b6 + content/12: 68037eba4afe99b1f034ffaadf751a55 + content/13: 596ea047d6324032c8ee435bcfe3fdfd + content/14: a6a77d570adec6e7216ba73d673bce3d + content/15: 712d8b91b2f470d7c500625d278402b7 + content/16: b3f207004a857355b155c6bf073658e2 + content/17: ac6e990253500f3b388b543ab34dc80c + content/18: dc3c1fd12f0f71f295fd4ca69216385b + content/19: 661662e176dc261885670517d9846ed5 + content/20: a7f3137205dfca1fd37c31407bd30b4c + content/21: 921dc6f5d42c548632918e33fd7032a1 + content/22: 69d133e925de5885c17de21ec7b56d31 + content/23: 96b809453c58ffc739650dfa229c8057 + content/24: 8c3c9ea7c3f00f13ab57af8b55642334 + content/25: 7e7350b95a65b8b88cdec5ea52efd6ee + content/26: 2a8bf3b9e6393acf30c92561b71c86b1 + content/27: 10e8e9a59847ddd720c6d06b12c7b120 + content/28: 9799b973234bf2d10d5c971b267f55a5 f957a4c6de0f91b449afb7e96daedaef: meta/title: 510e0fcb11a2a956510148bda5ad5ace meta/description: 33690c4d6ca0e3da8147229707139ce9 @@ -378,7 +379,7 @@ checksums: content/4: 9a3e928acd2ede61648f44f91d097986 content/5: 661e97346571e3f16d7b8aaf91b7be9f content/6: c4b67660a6923fcadc5678838e949d72 - content/7: 26bd82eefced9994a05da865e93660c6 + content/7: afbb93dab75a08031bea8e34c79ea8d2 content/8: 10e8e9a59847ddd720c6d06b12c7b120 content/9: 9799b973234bf2d10d5c971b267f55a5 b4af38dc2d0b2a8bad04b2c13c31c91b: @@ -389,7 +390,7 @@ checksums: content/0: 5a744203158a22c1a7e1147187f9991d content/1: c863016efb7b5da3899b673b961ed12b content/2: ac91e741dee3b660aebcf2326e921558 - content/3: 863a73b54c36fbfc94b656942e91e3ae + content/3: 5c52eadd43db08074c9dce390b8ecbf6 content/4: 0e527053fb440456179c1636cd4e6a03 content/5: 10e8e9a59847ddd720c6d06b12c7b120 content/6: 9799b973234bf2d10d5c971b267f55a5 @@ -2457,12 +2458,43 @@ checksums: content/4: 9799b973234bf2d10d5c971b267f55a5 00ad1ea5a31897ba8d809b95d2a35685: meta/title: 491fbb938cfe44df0438ad3e198d23e6 - meta/description: 9733b476e1c9f0a0a54474613ec212ca - meta/og%3Adescription: 521871c1114d4eb622b24fd17ec6b91a + meta/description: c4303f2b935502f67cbda997d83b701c + meta/og%3Adescription: d22d3186fa823884d8dcc154e1ad2704 meta/icon: 36e4f21bf2ebca153bea0479669ef733 - content/0: 040377b8c13a0665ffb600ee52933821 - content/1: 10e8e9a59847ddd720c6d06b12c7b120 - content/2: 9799b973234bf2d10d5c971b267f55a5 + content/0: 2032a4defaa136ccc9dbb6ade68d4aab + content/1: 7bdf5989f8c2b95f1ccc3dffefe9b981 + content/2: c2372f77e91f5e50157ae41846ede456 + content/3: 3fa965da8fe1ff73558b6c4776539cde + content/4: a46de28644e58a4a7a62526b1c11a057 + content/5: 507aefe508f8a02213759516de987c5c + content/6: 5fb03047f9b4d0fd9ca76448a00c6f8f + content/7: 194a8a7d08501e21757328a1288f76fa + content/8: f05fca5349f176314ce7c5ef0daaf9be + content/9: 9a8a4338d01744be965ba455dd200924 + content/10: b3f207004a857355b155c6bf073658e2 + content/11: 312086133369dd61e9855eca62e52ed3 + content/12: bd9c52eba32ecc8ea4f4cf164b2faf39 + content/13: 661662e176dc261885670517d9846ed5 + content/14: 2fc7248281a0b839d1b0df96404adbcd + content/15: c07d27593b2f36249fb1803883a67da4 + content/16: 8eec7b40710fa7a45ae3585fe58e4edf + content/17: 921dc6f5d42c548632918e33fd7032a1 + content/18: 69d133e925de5885c17de21ec7b56d31 + content/19: f69aa484a5aa6aebbceb192c9c7750fd + content/20: 92ea59d9cc03748fef727e94c31238a5 + content/21: 658f395d7080e64888f93a39e33e392e + content/22: 7132d84494820c1ddc1aac42881c3bbc + content/23: 70b7cf2893d09428bbdd7d3e410b27aa + content/24: b00838381eaec9cb81eb7705b50ebf67 + content/25: 27ac13621212cc9aae5d9e510ff85ff3 + content/26: 412ccc1e509fe8b50736887a4e5b1c2e + content/27: e0c7db928e542553683df7dd1c682109 + content/28: 187c183027e81fd7105c0f6dd2632a23 + content/29: 533daf1115ed6d5da2d4891356164171 + content/30: 2d9a3f34c128cf4f15a2813fffce5917 + content/31: 2a8bf3b9e6393acf30c92561b71c86b1 + content/32: 10e8e9a59847ddd720c6d06b12c7b120 + content/33: 9799b973234bf2d10d5c971b267f55a5 97859f5bb2185be6f36d8a74e9df13c8: meta/title: 2e4ba62f7aec1e3ce70aaec2df0acf40 meta/openapi: 9021a65626a3dac704db13ab44ca81bb @@ -6743,3 +6775,15 @@ checksums: meta/title: 7fd4ad1746778e0e50a3c9efc5c197ce meta/openapi: f825e1484582f3a94591a34dc8271c0a content/0: 6b56b87fe7b6113f15ed86aa5f3f416b + e96befc22e70985102661e2a422114cc: + meta/title: d6a5de303449a48ce065db4a9bba57f7 + meta/openapi: bf4492ae0436138ac4c7111d36ccf6b1 + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 + 7eea464129f7b77b16137cc06a271d23: + meta/title: 80998539b6e80160d015ea6725c63bb6 + meta/openapi: d9d1af4f7f5e7f5e9650c35bd617ce5a + content/0: c3d96e3528a55b20b8fbcae10af25b02 + content/1: 264d832bc605beaf5168c080bfed567c + content/2: 580af53aa9812f2ec29a632e145669a5 diff --git a/openapi/admin.yml b/openapi/admin.yml index ce0b446..9cddeeb 100644 --- a/openapi/admin.yml +++ b/openapi/admin.yml @@ -1,11 +1,11 @@ openapi: 3.1.0 info: title: Trophy - version: '1.17.0' + version: '1.18.0' x-fern-global-headers: - header: X-SDK-VERSION name: sdkVersion - x-fern-default: '1.17.0' + x-fern-default: '1.18.0' paths: /attributes: servers: @@ -4353,6 +4353,231 @@ paths: summary: Restore streaks for multiple users security: - ApiKeyAuth: [] + /application-api-keys: + servers: + - url: https://admin.trophy.so/v1 + description: Admin API + post: + description: >- + Create application API keys scoped to specific users. Each key can only + perform operations on behalf of the user it was created for. + operationId: admin_application_api_keys_create + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - applicationApiKeys + x-fern-sdk-method-name: create + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.applicationApiKeys.create([ + { userId: 'user_123' } + ]); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.applicationApiKeys.create([ + { "userId": "user_123" } + ]) + - lang: go + source: | + import ( + "context" + + api "github.com/trophyso/trophy-go" + trophyclient "github.com/trophyso/trophy-go/client" + "github.com/trophyso/trophy-go/option" + ) + + client := trophyclient.NewClient( + option.WithApiKey("YOUR_API_KEY"), + ) + + response, err := client.Admin.ApplicationApiKeys.Create(context.TODO(), api.CreateApplicationKeysRequest{}) + requestBody: + description: Array of users to create application API keys for. Maximum 100 users per request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApplicationKeysRequest' + examples: + Create application keys: + value: + - userId: user_123 + - userId: user_456 + responses: + '200': + description: Successful operation (no keys created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApplicationKeysResponse' + '201': + description: Created (at least one application API key created) + content: + application/json: + schema: + $ref: '#/components/schemas/CreateApplicationKeysResponse' + examples: + Success: + value: + created: + - id: 550e8400-e29b-41d4-a716-446655440000 + userId: user_123 + key: app_XXXXX.YOUR_API_KEY + prefix: app_XXXXX + issues: [] + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + '422': + description: Unprocessible Entity + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + summary: Create application API keys for users + security: + - ApiKeyAuth: [] + delete: + description: >- + Delete application API keys by ID. + operationId: admin_application_api_keys_delete + x-fern-server-name: admin + x-fern-sdk-group-name: + - admin + - applicationApiKeys + x-fern-sdk-method-name: delete + tags: + - Admin + x-codeSamples: + - lang: javascript + source: | + import { TrophyApiClient } from '@trophyso/node'; + + const trophy = new TrophyApiClient({ + apiKey: 'YOUR_API_KEY' + }); + + const response = await trophy.admin.applicationApiKeys.delete({ + ids: [ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + }); + - lang: python + source: | + from trophy import TrophyApi + + client = TrophyApi(api_key='YOUR_API_KEY') + + response = client.admin.applicationApiKeys.delete( + ids=[ + '550e8400-e29b-41d4-a716-446655440000', + '550e8400-e29b-41d4-a716-446655440001' + ] + ) + - lang: go + source: | + import ( + "context" + + trophyclient "github.com/trophyso/trophy-go/client" + "github.com/trophyso/trophy-go/option" + ) + + client := trophyclient.NewClient( + option.WithApiKey("YOUR_API_KEY"), + ) + + response, err := client.Admin.ApplicationApiKeys.Delete(context.TODO(), nil) + parameters: + - name: ids + in: query + description: >- + Application API key IDs (UUIDs returned at creation time). Repeat the + query param or provide a comma-separated list. Maximum 100 IDs per + request. + required: true + schema: + type: array + items: + type: string + format: uuid + maxItems: 100 + style: form + explode: true + examples: + Single ID: + value: + - 550e8400-e29b-41d4-a716-446655440000 + Multiple IDs: + value: + - 550e8400-e29b-41d4-a716-446655440000 + - 550e8400-e29b-41d4-a716-446655440001 + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteApplicationKeysResponse' + examples: + Success: + value: + deleted: + - id: 550e8400-e29b-41d4-a716-446655440000 + issues: [] + Partial success: + value: + deleted: + - id: 550e8400-e29b-41d4-a716-446655440000 + issues: + - id: 550e8400-e29b-41d4-a716-446655440999 + severity: error + message: Application API key not found by ID + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + '403': + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + '422': + description: Unprocessible Entity + content: + application/json: + schema: + $ref: '#/components/schemas/AdminErrorBody' + summary: Delete application API keys + security: + - ApiKeyAuth: [] /tenants: servers: - url: https://admin.trophy.so/v1 @@ -6410,6 +6635,10 @@ components: type: object description: An issue encountered while processing an item in an admin API request. properties: + id: + type: string + description: The ID of the resource the issue relates to, when applicable. + example: 550e8400-e29b-41d4-a716-446655440000 userId: type: string description: The ID of the user the issue relates to, when applicable. @@ -6432,7 +6661,7 @@ components: message: type: string description: A human-readable description of the issue. - example: Would exceed maximum freeze limit + example: Description of the issue. required: - severity - message @@ -6751,6 +6980,91 @@ components: required: - customerId - name + CreateApplicationKeysRequest: + title: CreateApplicationKeysRequest + type: array + description: Request body for creating application API keys. + items: + $ref: '#/components/schemas/CreateApplicationKeyRequestItem' + minItems: 1 + maxItems: 100 + CreateApplicationKeyRequestItem: + title: CreateApplicationKeyRequestItem + type: object + description: A user to create an application API key for. + properties: + userId: + type: string + description: The user ID to scope the application API key to. + example: user_123 + maxLength: 255 + required: + - userId + CreatedApplicationKey: + title: CreatedApplicationKey + type: object + description: A newly created application API key. + properties: + id: + type: string + format: uuid + description: The unique identifier of the API key. Use this ID to delete the key. + example: 550e8400-e29b-41d4-a716-446655440000 + userId: + type: string + description: The user ID the key is scoped to. + example: user_123 + key: + type: string + description: >- + The full API key value. This is only returned once at creation time + and cannot be retrieved again. + example: app_XXXXX.YOUR_API_KEY + prefix: + type: string + description: The key prefix used for cache lookup. + example: app_XXXXX + required: + - id + - userId + - key + - prefix + CreateApplicationKeysResponse: + title: CreateApplicationKeysResponse + type: object + description: Response containing created application API keys and any issues. + properties: + created: + type: array + items: + $ref: '#/components/schemas/CreatedApplicationKey' + description: Array of successfully created application API keys. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during creation. + required: + - created + - issues + DeleteApplicationKeysResponse: + title: DeleteApplicationKeysResponse + type: object + description: Response containing deleted application API key IDs and any issues. + properties: + deleted: + type: array + items: + $ref: '#/components/schemas/DeletedResource' + description: Array of deleted application API key IDs. + issues: + type: array + items: + $ref: '#/components/schemas/AdminIssue' + description: Array of issues encountered during deletion. + required: + - deleted + - issues CreateTenantsResponse: title: CreateTenantsResponse type: object diff --git a/snippets/admin-api-authenticate-request-block.mdx b/snippets/admin-api-authenticate-request-block.mdx new file mode 100644 index 0000000..6d9ebb8 --- /dev/null +++ b/snippets/admin-api-authenticate-request-block.mdx @@ -0,0 +1,58 @@ + +```bash cURL +curl https://admin.trophy.so/v1/metrics \ + -H "X-API-KEY: YOUR_API_KEY" +``` + +```typescript Node +import { TrophyApiClient } from "@trophyso/node"; + +const trophy = new TrophyApiClient({ + apiKey: "YOUR_API_KEY", +}); +``` + +```python Python +from trophy import TrophyApi + +client = TrophyApi( + api_key="YOUR_API_KEY", +) +``` + +```php PHP +use Trophy\TrophyClient; + +$trophy = new TrophyClient("YOUR_API_KEY"); +``` + +```java Java +TrophyApiClient client = TrophyApiClient.builder() + .apiKey("YOUR_API_KEY") + .build(); +``` + +```go Go +import ( + trophyclient "github.com/trophyso/trophy-go/client" + "github.com/trophyso/trophy-go/option" +) + +client := trophyclient.NewClient( + option.WithApiKey("YOUR_API_KEY"), +) +``` + +```csharp C# +var trophy = new TrophyApiClient( + apiKey: "YOUR_API_KEY" +); +``` + +```ruby Ruby +client = Trophy::Client.new( + api_key: "YOUR_API_KEY" +) +``` + + diff --git a/snippets/application-api-authenticate-request-block.mdx b/snippets/application-api-authenticate-request-block.mdx new file mode 100644 index 0000000..9ccf48e --- /dev/null +++ b/snippets/application-api-authenticate-request-block.mdx @@ -0,0 +1,58 @@ + +```bash cURL +curl https://api.trophy.so/v1/users/user_123/metrics/ \ + -H "X-API-KEY: YOUR_API_KEY" +``` + +```typescript Node +import { TrophyApiClient } from "@trophyso/node"; + +const trophy = new TrophyApiClient({ + apiKey: "YOUR_API_KEY", +}); +``` + +```python Python +from trophy import TrophyApi + +client = TrophyApi( + api_key="YOUR_API_KEY", +) +``` + +```php PHP +use Trophy\TrophyClient; + +$trophy = new TrophyClient("YOUR_API_KEY"); +``` + +```java Java +TrophyApiClient client = TrophyApiClient.builder() + .apiKey("YOUR_API_KEY") + .build(); +``` + +```go Go +import ( + trophyclient "github.com/trophyso/trophy-go/client" + "github.com/trophyso/trophy-go/option" +) + +client := trophyclient.NewClient( + option.WithApiKey("YOUR_API_KEY"), +) +``` + +```csharp C# +var trophy = new TrophyApiClient( + apiKey: "YOUR_API_KEY" +); +``` + +```ruby Ruby +client = Trophy::Client.new( + api_key: "YOUR_API_KEY" +) +``` + + diff --git a/snippets/create-application-api-keys-request-block.mdx b/snippets/create-application-api-keys-request-block.mdx new file mode 100644 index 0000000..13566e3 --- /dev/null +++ b/snippets/create-application-api-keys-request-block.mdx @@ -0,0 +1,73 @@ + +```bash cURL +curl -X POST https://admin.trophy.so/v1/application-api-keys \ + -H "X-API-KEY: " \ + -H "Content-Type: application/json" \ + -d '[ + { "userId": "user_123" }, + { "userId": "user_456" } + ]' +``` + +```typescript Node +await trophy.admin.applicationApiKeys.create([ + { userId: "user_123" }, + { userId: "user_456" }, +]); +``` + +```python Python +client.admin.application_api_keys.create( + request=[ + CreateApplicationKeyRequestItem( + user_id="user_123", + ), + CreateApplicationKeyRequestItem( + user_id="user_456", + ), + ], +) +``` + +```php PHP +$trophy->admin->applicationApiKeys->create([ + ['userId' => 'user_123'], + ['userId' => 'user_456'], +]); +``` + +```java Java +CreateApplicationKeysResponse response = client.admin().applicationApiKeys().create( + List.of( + CreateApplicationKeyRequestItem.builder().userId("user_123").build(), + CreateApplicationKeyRequestItem.builder().userId("user_456").build() + ) +); +``` + +```go Go +response, err := client.Admin.ApplicationApiKeys.Create( + context.TODO(), + []*api.CreateApplicationKeyRequestItem{ + {UserId: "user_123"}, + {UserId: "user_456"}, + }, +) +``` + +```csharp C# +await trophy.Admin.ApplicationApiKeys.CreateAsync(new[] +{ + new CreateApplicationKeyRequestItem { UserId = "user_123" }, + new CreateApplicationKeyRequestItem { UserId = "user_456" }, +}); +``` + +```ruby Ruby +result = client.admin.application_api_keys.create([ + { user_id: 'user_123' }, + { user_id: 'user_456' } +]) +``` + + diff --git a/snippets/delete-application-api-keys-request-block.mdx b/snippets/delete-application-api-keys-request-block.mdx new file mode 100644 index 0000000..ec815e5 --- /dev/null +++ b/snippets/delete-application-api-keys-request-block.mdx @@ -0,0 +1,57 @@ + +```bash cURL +curl -X DELETE "https://admin.trophy.so/v1/application-api-keys?ids=550e8400-e29b-41d4-a716-446655440000" \ + -H "X-API-KEY: " +``` + +```typescript Node +await trophy.admin.applicationApiKeys.delete({ + ids: ["550e8400-e29b-41d4-a716-446655440000"], +}); +``` + +```python Python +client.admin.application_api_keys.delete( + ids=["550e8400-e29b-41d4-a716-446655440000"], +) +``` + +```php PHP +$trophy->admin->applicationApiKeys->delete([ + 'ids' => ['550e8400-e29b-41d4-a716-446655440000'], +]); +``` + +```java Java +DeleteApplicationKeysResponse response = client.admin().applicationApiKeys().delete( + ApplicationApiKeysDeleteRequest.builder() + .ids(List.of("550e8400-e29b-41d4-a716-446655440000")) + .build() +); +``` + +```go Go +response, err := client.Admin.ApplicationApiKeys.Delete( + context.TODO(), + &admin.ApplicationApiKeysDeleteRequest{ + Ids: []*string{ + api.String("550e8400-e29b-41d4-a716-446655440000"), + }, + }, +) +``` + +```csharp C# +await trophy.Admin.ApplicationApiKeys.DeleteAsync(new ApplicationApiKeysDeleteRequest +{ + Ids = new[] { "550e8400-e29b-41d4-a716-446655440000" }, +}); +``` + +```ruby Ruby +result = client.admin.application_api_keys.delete( + ids: ['550e8400-e29b-41d4-a716-446655440000'] +) +``` + +