Licenses
Listar Claves de Licencia
deprecated
Recupera una lista de claves de licencia asociadas con tu cuenta.
GET
/
license_keys
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.license_keys.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.LicenseKeys.List(context.TODO(), dodopayments.LicenseKeyListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeys.LicenseKeyListPage;
import com.dodopayments.api.models.licensekeys.LicenseKeyListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyListPage page = client.licenseKeys().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeys.LicenseKeyListPage
import com.dodopayments.api.models.licensekeys.LicenseKeyListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: LicenseKeyListPage = client.licenseKeys().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.license_keys.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->licenseKeys->list(
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
customerID: 'customer_id',
pageNumber: 0,
pageSize: 0,
productID: 'product_id',
source: 'auto',
status: 'active',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeys;
DodoPaymentsClient client = new();
LicenseKeyListParams parameters = new();
var page = await client.LicenseKeys.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.license_keys()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_keys \
--header 'Authorization: Bearer <token>'{
"items": [
{
"brand_id": "<string>",
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"customer_id": "cus_123",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"product_id": "<string>",
"activations_limit": 5,
"expires_at": "2024-12-31T23:59:59.000Z",
"payment_id": "<string>",
"subscription_id": "<string>"
}
]
}API obsoleta: Las claves de licencia ahora se gestionan a través del sistema de Derechos. Utiliza List Customer Grants para listar las claves de licencia emitidas (filtrando con
integration_type=license_key); cada concesión lleva sus detalles license_key. Este endpoint se eliminará en una versión futura.Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de consulta
Page size default is 10 max is 100
Rango requerido:
x >= 0Page number default is 0
Rango requerido:
x >= 0Filter by customer ID
Filter by license key status
Opciones disponibles:
active, expired, disabled Filter by product ID
Filter license keys created on or after this timestamp
Filter license keys created on or before this timestamp
Filter by license key source
Opciones disponibles:
auto, import, manual Respuesta
Show child attributes
Show child attributes
Última modificación el 9 de julio de 2026
¿Esta página le ayudó?
Anterior
Obtener clave de licenciaRecuperar los detalles de una clave de licencia específica por su ID.
Siguiente
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const licenseKey of client.licenseKeys.list()) {
console.log(licenseKey.id);
}import os
from dodopayments import DodoPayments
client = DodoPayments(
bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"), # This is the default and can be omitted
)
page = client.license_keys.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/dodopayments/dodopayments-go"
"github.com/dodopayments/dodopayments-go/option"
)
func main() {
client := dodopayments.NewClient(
option.WithBearerToken("My Bearer Token"),
)
page, err := client.LicenseKeys.List(context.TODO(), dodopayments.LicenseKeyListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeys.LicenseKeyListPage;
import com.dodopayments.api.models.licensekeys.LicenseKeyListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyListPage page = client.licenseKeys().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeys.LicenseKeyListPage
import com.dodopayments.api.models.licensekeys.LicenseKeyListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: LicenseKeyListPage = client.licenseKeys().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.license_keys.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Dodopayments\Client;
use Dodopayments\Core\Exceptions\APIException;
$client = new Client(
bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
environment: 'test_mode',
);
try {
$page = $client->licenseKeys->list(
createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
customerID: 'customer_id',
pageNumber: 0,
pageSize: 0,
productID: 'product_id',
source: 'auto',
status: 'active',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeys;
DodoPaymentsClient client = new();
LicenseKeyListParams parameters = new();
var page = await client.LicenseKeys.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.license_keys()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_keys \
--header 'Authorization: Bearer <token>'{
"items": [
{
"brand_id": "<string>",
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"customer_id": "cus_123",
"id": "lic_123",
"instances_count": 123,
"key": "<string>",
"product_id": "<string>",
"activations_limit": 5,
"expires_at": "2024-12-31T23:59:59.000Z",
"payment_id": "<string>",
"subscription_id": "<string>"
}
]
}