Question

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

Posted January 12, 2015 1.4k views

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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.
Submit an Answer