Component Client Keys

Component client keys are used to authenticate Duffel UI components.

component_client_key
string

The client key to authenticate Duffel UI components.

Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiaWN1XzAwMDBBZ1ppdHBPblF0ZDNOUXhqd08iLCJvcmRlcl9pZCI6Im9yZF8wMDAwQUJkWm5nZ1NjdDdCb3JhVTFvIiwiaWF0IjoxNTE2MjM5MDIyfQ.GtJDKrfum7aLlNaXmUj-RtQIbx0-Opwjdid0fiJk6DE"

Body parameters

To create a client key you may provide a user_id, user_id and order_id, or user_id and booking_id. Client key may also be created without any request data.

Component Client Key User Only Payload
object

Use this payload to create a client key scoped to a customer user

Component Client Key User And Order Payload
object

Use this payload to create a client key scoped to a customer user and order.

Component Client Key User And Booking Payload
object

Use this payload to create a client key scoped to a customer user and booking.

Endpoint

POST https://api.duffel.com/identity/component_client_keys

Request

curl -X POST --compressed "https://api.duffel.com/identity/component_client_keys" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "Duffel-Version: v2" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
-d '{}'

Response

{
"data": {
"component_client_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiaWN1XzAwMDBBZ1ppdHBPblF0ZDNOUXhqd08iLCJvcmRlcl9pZCI6Im9yZF8wMDAwQUJkWm5nZ1NjdDdCb3JhVTFvIiwiaWF0IjoxNTE2MjM5MDIyfQ.GtJDKrfum7aLlNaXmUj-RtQIbx0-Opwjdid0fiJk6DE"
}
}