मुख्य सामग्री पर जाएं
POST
/
licenses
/
activate
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.activate({ license_key: 'license_key', name: 'name' });

console.log(response.id);
{
  "business_id": "<string>",
  "created_at": "2024-01-01T00:00:00Z",
  "customer": {
    "customer_id": "<string>",
    "email": "<string>",
    "name": "<string>",
    "metadata": {},
    "phone_number": "<string>"
  },
  "id": "lki_123",
  "license_key_id": "lic_123",
  "name": "Production Server 1",
  "product": {
    "product_id": "<string>",
    "name": "<string>"
  }
}
कोई API कुंजी आवश्यक नहीं: यह एक सार्वजनिक एंडपॉइंट है जिसे प्रमाणीकरण की आवश्यकता नहीं है। आप इसे सीधे क्लाइंट एप्लिकेशन, डेस्कटॉप सॉफ़्टवेयर, या CLIs से लाइसेंस कुंजी सक्रिय करने के लिए कॉल कर सकते हैं बिना अपने API क्रेडेंशियल्स को उजागर किए।

बॉडी

application/json
license_key
string
आवश्यक
name
string
आवश्यक

प्रतिक्रिया

License key instance created

business_id
string
आवश्यक

Business ID

created_at
string<date-time>
आवश्यक

Creation timestamp

उदाहरण:

"2024-01-01T00:00:00Z"

customer
object
आवश्यक

Limited customer details associated with the license key.

id
string
आवश्यक

License key instance ID

उदाहरण:

"lki_123"

license_key_id
string
आवश्यक

Associated license key ID

उदाहरण:

"lic_123"

name
string
आवश्यक

Instance name

उदाहरण:

"Production Server 1"

product
object
आवश्यक

Related product info. Present if the license key is tied to a product.