Licenses
라이센스 검증
이 엔드포인트는 사용자의 라이센스를 검증할 수 있게 해줍니다.
POST
/
licenses
/
validate
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 response = await client.licenses.validate({
license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',
});
console.log(response.valid);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
)
response = client.licenses.validate(
license_key="2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43",
)
print(response.valid)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"),
)
response, err := client.Licenses.Validate(context.TODO(), dodopayments.LicenseValidateParams{
LicenseKey: dodopayments.F("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Valid)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licenses.LicenseValidateParams;
import com.dodopayments.api.models.licenses.LicenseValidateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseValidateParams params = LicenseValidateParams.builder()
.licenseKey("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
.build();
LicenseValidateResponse response = client.licenses().validate(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licenses.LicenseValidateParams
import com.dodopayments.api.models.licenses.LicenseValidateResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: LicenseValidateParams = LicenseValidateParams.builder()
.licenseKey("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
.build()
val response: LicenseValidateResponse = client.licenses().validate(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.licenses.validate(license_key: "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
puts(response)<?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 {
$response = $client->licenses->validate(
licenseKey: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',
licenseKeyInstanceID: 'lki_123',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Licenses;
DodoPaymentsClient client = new();
LicenseValidateParams parameters = new()
{
LicenseKey = "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43"
};
var response = await client.Licenses.Validate(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.licenses()
.validate()
.body(dodopayments::models::LicensesValidateParams {
license_key: Some("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43".to_string()),
..Default::default()
})
.await?;
println!("{result:?}");
Ok(())
}curl --request POST \
--url https://test.dodopayments.com/licenses/validate \
--header 'Content-Type: application/json' \
--data '
{
"license_key": "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43",
"license_key_instance_id": "lki_123"
}
'{
"valid": true
}API 키 불필요: 이는 인증이 필요하지 않은 공개 엔드포인트입니다. API 자격 증명을 노출하지 않고 클라이언트 애플리케이션, 데스크톱 소프트웨어 또는 CLI에서 라이선스 키를 검증하기 위해 직접 호출할 수 있습니다.
마지막 수정일 2026년 4월 1일
⌘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 response = await client.licenses.validate({
license_key: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',
});
console.log(response.valid);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
)
response = client.licenses.validate(
license_key="2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43",
)
print(response.valid)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"),
)
response, err := client.Licenses.Validate(context.TODO(), dodopayments.LicenseValidateParams{
LicenseKey: dodopayments.F("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Valid)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.licenses.LicenseValidateParams;
import com.dodopayments.api.models.licenses.LicenseValidateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
LicenseValidateParams params = LicenseValidateParams.builder()
.licenseKey("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
.build();
LicenseValidateResponse response = client.licenses().validate(params);
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.licenses.LicenseValidateParams
import com.dodopayments.api.models.licenses.LicenseValidateResponse
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val params: LicenseValidateParams = LicenseValidateParams.builder()
.licenseKey("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
.build()
val response: LicenseValidateResponse = client.licenses().validate(params)
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
response = dodo_payments.licenses.validate(license_key: "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43")
puts(response)<?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 {
$response = $client->licenses->validate(
licenseKey: '2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43',
licenseKeyInstanceID: 'lki_123',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Licenses;
DodoPaymentsClient client = new();
LicenseValidateParams parameters = new()
{
LicenseKey = "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43"
};
var response = await client.Licenses.Validate(parameters);
Console.WriteLine(response);use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.licenses()
.validate()
.body(dodopayments::models::LicensesValidateParams {
license_key: Some("2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43".to_string()),
..Default::default()
})
.await?;
println!("{result:?}");
Ok(())
}curl --request POST \
--url https://test.dodopayments.com/licenses/validate \
--header 'Content-Type: application/json' \
--data '
{
"license_key": "2b1f8e2d-c41e-4e8f-b2d3-d9fd61c38f43",
"license_key_instance_id": "lki_123"
}
'{
"valid": true
}