Javascript client library
Getting Started
To make it easy to build your Duffel integration, we offer a JavaScript client library.
Installation
To install the library using your favourite package manager:
Shell (using yarn)
yarnnpm
copy
yarn add @duffel/api
Usage
Then import it into your codebase and initialise it with your access token:
JavaScript
copy
import { Duffel } from '@duffel/api'
const duffel = new Duffel({
token: YOUR_ACCESS_TOKEN,
})
View the repository on GitHub and check out the npm package:
duffelhq/duffel-api-javascript
The JavaScript client library for the Duffel API on GitHub](https://github.com/duffelhq/duffel-api-javascript)
@duffel/api
JavaScript client library for the Duffel API](https://www.npmjs.com/package/@duffel/api)