Blog

Integrate Your Apps With Our API Using OAuth

Oauth sammy

OAuth 2 is now available for applications harnessing the DigitalOcean API, giving developers an easy way to integrate their applications with user accounts. Users can quickly authorize third-party applications with read or read & write access to their DigitalOcean account without exposing personal credentials.

Prior to OAuth support, applications that used the API required users to supply their personal access token, a manual and inconvenient process. The new OAuth flow, available in APIv2, is much better suited for web applications, as users can safely and easily provide access to their accounts through a DigitalOcean authorization request page.

Authorize Application page

Additionally, users can view and revoke account access to authorized applications within the DigitalOcean control panel.

Getting Started

Since we use Ruby internally, we are providing our open source OAuth strategy for the community to use. The omniauth-digitalocean gem is on Github and published to RubyGems. Based on OmniAuth, the widely used Rack-based library for multi-provider authentication, the gem is an easy way to integrate “sign in with DigitalOcean" into Rails and Rack frameworks. We are excited to join the growing list of providers with OmniAuth strategies.

We’ve also developed some community resources to help you get started with OAuth, including a general intro to OAuth 2 and a tutorial on how to use OAuth with DigitalOcean both as a user and as a developer.

As we continue to refine our new API, we always appreciate any feedback on our API v2 Github page. And if you want to let people know about what you’ve built, submit your applications to the DigitalOcean projects page. We’re excited to highlight the great work of the DO community.