Licenses
Get License Key Instance
Retrieve details of a specific license key instance by its ID.
GET
/
license_key_instances
/
{id}
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_123');
console.log(licenseKeyInstance.id);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
license_key_instance = client.license_key_instances.retrieve(
"lki_123",
)
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_123")
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_123");
}
}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_123")
}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_123")
puts(license_key_instance)curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/license_key_instances/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
License key instance ID
Was this page helpful?
⌘I
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: 'My Bearer Token',
});
const licenseKeyInstance = await client.licenseKeyInstances.retrieve('lki_123');
console.log(licenseKeyInstance.id);from dodopayments import DodoPayments
client = DodoPayments(
bearer_token="My Bearer Token",
)
license_key_instance = client.license_key_instances.retrieve(
"lki_123",
)
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_123")
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_123");
}
}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_123")
}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_123")
puts(license_key_instance)curl --request GET \
--url https://test.dodopayments.com/license_key_instances/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.dodopayments.com/license_key_instances/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"business_id": "<string>",
"created_at": "2024-01-01T00:00:00Z",
"id": "lki_123",
"license_key_id": "lic_123",
"name": "Production Server 1"
}