Licenses
Lấy Thông Tin Khóa Bản Quyền
Lấy chi tiết của một khóa bản quyền cụ thể theo ID của nó.
GET
/
license_key_instances
/
{id}
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_EeWORStkMc7z0KycI31VS');
console.log(licenseKeyInstance.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
)
license_key_instance = client.license_key_instances.retrieve(
"lki_EeWORStkMc7z0KycI31VS",
)
print(license_key_instance.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"),
)
licenseKeyInstance, err := client.LicenseKeyInstances.Get(context.TODO(), "lki_EeWORStkMc7z0KycI31VS")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", licenseKeyInstance.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyInstance licenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val licenseKeyInstance: LicenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
license_key_instance = dodo_payments.license_key_instances.retrieve("lki_EeWORStkMc7z0KycI31VS")
puts(license_key_instance)<?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 {
$licenseKeyInstance = $client->licenseKeyInstances->retrieve(
'lki_EeWORStkMc7z0KycI31VS'
);
var_dump($licenseKeyInstance);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeyInstances;
DodoPaymentsClient client = new();
LicenseKeyInstanceRetrieveParams parameters = new()
{
ID = "lki_EeWORStkMc7z0KycI31VS"
};
var licenseKeyInstance = await client.LicenseKeyInstances.Retrieve(parameters);
Console.WriteLine(licenseKeyInstance);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.license_key_instances()
.retrieve()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tham số đường dẫn
License key instance ID
Lần sửa đổi cuối 1 tháng 4, 2026
Trang này có hữu ích không?
Trước
Cập nhật Thông tin Khóa Bản quyềnĐiểm cuối này cho phép bạn cập nhật một thông tin khóa bản quyền cụ thể theo ID của nó.
Tiếp theo
⌘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
});
const licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_EeWORStkMc7z0KycI31VS');
console.log(licenseKeyInstance.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
)
license_key_instance = client.license_key_instances.retrieve(
"lki_EeWORStkMc7z0KycI31VS",
)
print(license_key_instance.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"),
)
licenseKeyInstance, err := client.LicenseKeyInstances.Get(context.TODO(), "lki_EeWORStkMc7z0KycI31VS")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", licenseKeyInstance.ID)
}
package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance;
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseKeyInstance licenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS");
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstance
import com.dodopayments.api.models.licensekeyinstances.LicenseKeyInstanceRetrieveParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val licenseKeyInstance: LicenseKeyInstance = client.licenseKeyInstances().retrieve("lki_EeWORStkMc7z0KycI31VS")
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
license_key_instance = dodo_payments.license_key_instances.retrieve("lki_EeWORStkMc7z0KycI31VS")
puts(license_key_instance)<?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 {
$licenseKeyInstance = $client->licenseKeyInstances->retrieve(
'lki_EeWORStkMc7z0KycI31VS'
);
var_dump($licenseKeyInstance);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.LicenseKeyInstances;
DodoPaymentsClient client = new();
LicenseKeyInstanceRetrieveParams parameters = new()
{
ID = "lki_EeWORStkMc7z0KycI31VS"
};
var licenseKeyInstance = await client.LicenseKeyInstances.Retrieve(parameters);
Console.WriteLine(licenseKeyInstance);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let id = "id";
let result = client
.license_key_instances()
.retrieve()
.id(id)
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}