Is there a way to exchange user/password for an API token through the v2 REST API?

January 12, 2015 553 views

I would like to authenticate users through the API without having them go to their console to generate an API token if possible.

1 Answer

Yes! The API can authenticate users with a standard OAuth 2 flow. Check out the developer documentation as well as this tutorial:

We also have a more general tutorial on OAuth that might be useful:

by Justin Ellingwood
One of the most exciting features about version 2 of DigitalOcean's API is the inclusion of OAuth authentication. This allows users to grant access to applications to use their account. As a developer, you can request access from your users through a simple web UI which will streamline the process of gaining account authorization. In this guide, we will discuss how to interact with this feature as both a user and developer.
Have another answer? Share your knowledge.