Skip to main content

Easily Integrate
DigitalOcean's API using Konfig's TypeScript SDK

Need a TypeScript SDK for DigitalOcean's API?

Growing API Companies trust Konfig's SDKs to onboard developers to their API.

SnapTradeHumanloopSplititLeapGroundx

First, instantiate the SDK

It only takes a few lines of code.

index.ts

import { DigitalOcean } from 'digital-ocean-typescript-sdk';
const digitalOcean = new DigitalOcean({
/*
* ## OAuth Authentication
*
* In order to interact with the DigitalOcean API, you or your application must
* authenticate.
*
* The DigitalOcean API handles this through OAuth, an open standard for
* authorization. OAuth allows you to delegate access to your account in full
* or in read-only mode.
*
* You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)
* section of the DigitalOcean control panel for your account.
*
* An OAuth token functions as a complete authentication request. In effect, it
* acts as a substitute for a username and password pair.
*
* Because of this, it is absolutely **essential** that you keep your OAuth
* tokens secure. In fact, upon generation, the web interface will only display
* each token a single time in order to prevent the token from being compromised.
*
* DigitalOcean access tokens begin with an identifiable prefix in order to
* distinguish them from other similar tokens.
*
* - `dop_v1_` for personal access tokens generated in the control panel
* - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)
* - `dor_v1_` for OAuth refresh tokens
*
* ### How to Authenticate with OAuth
*
* In order to make an authenticated request, include a bearer-type
* `Authorization` header containing your OAuth token. All requests must be
* made over HTTPS.
*
* ### Authenticate with a Bearer Authorization Header
*
* ```
* curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT"
* ```
*
*/
bearerAuth: "BEARER_AUTH"
})

Then, send your first request

We made it really easy.

index.ts

// List 1-Click Applications
const listResponse = digitalOcean.1ClickApplications.list({
type: "kubernetes"
})

Enjoy a buttery smooth developer experience with 302 SDK methods

How Konfig Works

Konfig collects APIs and automatically generates SDKs so you can focus on building your application.

openapi-examples

Konfig maintains the highest quality collection of OpenAPI Specifications on the internet in a GitHub repository

We pull OpenAPI Specifications from public sources, fix any errors, and make sure they pass our lint rules. We continually make sure the repository is up-to-date and collect up-time and response time metrics for every API.

openapi-examples-to-konfig

Generates AI-Augmented SDKs from openapi-examples

Our SDK generator is trusted by growing API companies and goes through a rigorous testing process to ensure the generated SDKs are high-quality and easy to use.

konfig-to-package-managers

Publishes to standard package managers

We publish to standard package managers like npm, PyPI, and Maven so you can easily integrate the SDK into your application.

DigitalOcean

About DigitalOcean

DigitalOcean is a cloud infrastructure provider that offers virtual servers, storage, networking, and more to help developers deploy and scale applications quickly and easily. Known for its simplicity and developer-friendly tools, DigitalOcean is used by startup companies, independent developers, and enterprises alike to power a wide range of web applications and services.

Keywords

cloud
data_center
storage
virtual_private_servers
developer_tools
automation
collaboration

Start integrating DigitalOcean's API with Konfig