Entitlements
Liệt kê Quyền
Liệt kê tất cả quyền cho doanh nghiệp của bạn với tùy chọn lọc theo loại tích hợp.
GET
/
entitlements
JavaScript
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const entitlement of client.entitlements.list()) {
console.log(entitlement.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
)
page = client.entitlements.list()
page = page.items[0]
print(page.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"),
)
page, err := client.Entitlements.List(context.TODO(), dodopayments.EntitlementListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.EntitlementListPage;
import com.dodopayments.api.models.entitlements.EntitlementListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
EntitlementListPage page = client.entitlements().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.EntitlementListPage
import com.dodopayments.api.models.entitlements.EntitlementListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: EntitlementListPage = client.entitlements().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.entitlements.list
puts(page)<?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 {
$page = $client->entitlements->list(
integrationType: 'discord', pageNumber: 0, pageSize: 0
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements;
DodoPaymentsClient client = new();
EntitlementListParams parameters = new();
var page = await client.Entitlements.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.entitlements()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/entitlements \
--header 'Authorization: Bearer <token>'{
"items": [
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"integration_config": {
"feature_id": "<string>",
"feature_type": "boolean"
},
"is_active": true,
"metadata": {},
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}Ủy quyền
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Tham số truy vấn
Page size (default 10, max 100)
Phạm vi bắt buộc:
x >= 0Page number (default 0)
Phạm vi bắt buộc:
x >= 0Filter by integration type
Tùy chọn có sẵn:
discord, telegram, github, figma, framer, notion, digital_files, license_key, feature_flag Phản hồi
Show child attributes
Show child attributes
Lần sửa đổi cuối 13 tháng 5, 2026
Trang này có hữu ích không?
Trước
Tạo Quyền HạnTạo một quyền mới của bất kỳ loại tích hợp nào — Key License, Tệp Kỹ Thuật Số, Discord, GitHub, Telegram, Figma, Framer, hoặc Notion.
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
});
// Automatically fetches more pages as needed.
for await (const entitlement of client.entitlements.list()) {
console.log(entitlement.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
)
page = client.entitlements.list()
page = page.items[0]
print(page.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"),
)
page, err := client.Entitlements.List(context.TODO(), dodopayments.EntitlementListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.dodopayments.api.example;
import com.dodopayments.api.client.DodoPaymentsClient;
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
import com.dodopayments.api.models.entitlements.EntitlementListPage;
import com.dodopayments.api.models.entitlements.EntitlementListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();
EntitlementListPage page = client.entitlements().list();
}
}package com.dodopayments.api.example
import com.dodopayments.api.client.DodoPaymentsClient
import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
import com.dodopayments.api.models.entitlements.EntitlementListPage
import com.dodopayments.api.models.entitlements.EntitlementListParams
fun main() {
val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()
val page: EntitlementListPage = client.entitlements().list()
}require "dodopayments"
dodo_payments = Dodopayments::Client.new(
bearer_token: "My Bearer Token",
environment: "test_mode" # defaults to "live_mode"
)
page = dodo_payments.entitlements.list
puts(page)<?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 {
$page = $client->entitlements->list(
integrationType: 'discord', pageNumber: 0, pageSize: 0
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}using System;
using DodoPayments.Client;
using DodoPayments.Client.Models.Entitlements;
DodoPaymentsClient client = new();
EntitlementListParams parameters = new();
var page = await client.Entitlements.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}use dodopayments::Client;
#[tokio::main]
async fn main() -> dodopayments::Result<()> {
let client = Client::from_env()?;
let result = client
.entitlements()
.list()
.query(serde_json::json!({}))
.await?;
println!("{result:?}");
Ok(())
}curl --request GET \
--url https://test.dodopayments.com/entitlements \
--header 'Authorization: Bearer <token>'{
"items": [
{
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"integration_config": {
"feature_id": "<string>",
"feature_type": "boolean"
},
"is_active": true,
"metadata": {},
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}