Licenses
Ottieni l'istanza della chiave di licenza
Recupera i dettagli di un’istanza specifica della chiave di licenza tramite il suo ID.
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"
}Autorizzazioni
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parametri del percorso
License key instance ID
Ultima modifica il 1 aprile 2026
Questa pagina è stata utile?
Precedente
Aggiorna l'istanza della chiave di licenzaQuesto endpoint consente di aggiornare un'istanza specifica della chiave di licenza tramite il suo ID.
Successivo
⌘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"
}