Licenses
라이선스 키 나열
deprecated
귀하의 계정과 연결된 라이센스 키 목록을 가져옵니다.
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: 라이선스 키는 이제 Entitlements 시스템을 통해 관리됩니다. 발급된 라이선스 키를 나열하려면 List Customer Grants를 사용하세요 (
integration_type=license_key로 필터링); 각 권한 부여에는 license_key 세부 정보가 포함되어 있습니다. 이 엔드포인트는 향후 릴리스에서 제거될 예정입니다.인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
쿼리 매개변수
Page size default is 10 max is 100
필수 범위:
x >= 0Page number default is 0
필수 범위:
x >= 0Filter by customer ID
Filter by license key status
사용 가능한 옵션:
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
사용 가능한 옵션:
auto, import, manual 응답
Show child attributes
Show child attributes
마지막 수정일 2026년 7월 9일
⌘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>"
}
]
}