メインコンテンツへスキップ
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 詳細が含まれています。このエンドポイントは将来のリリースで削除されます。

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

クエリパラメータ

page_size
integer<int32>

Page size default is 10 max is 100

必須範囲: x >= 0
page_number
integer<int32>

Page number default is 0

必須範囲: x >= 0
customer_id
string

Filter by customer ID

status
enum<string>

Filter by license key status

利用可能なオプション:
active,
expired,
disabled
product_id
string

Filter by product ID

created_at_gte
string<date-time>

Filter license keys created on or after this timestamp

created_at_lte
string<date-time>

Filter license keys created on or before this timestamp

source
enum<string>

Filter by license key source

利用可能なオプション:
auto,
import,
manual

レスポンス

items
object[]
必須
最終更新日 2026年7月9日