DO Ideas 2

Create an API to get the account's remaining credit

I'd like to query my account's remaining credit ($) through API, it is possible?

Something like:
curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer xxxxxxxxxxx" ""

When I run it, it will return my account's remaining credit.

I want to build a Linux script to query my account remaining credit so I can notify myself to charge more credit into the account when the remaining credit is running low.

This is especially useful if I have multiple digitalocean accounts, then I don't have to login into every account manually to see which account is running low on credit and needs a charge

  • Anonymous
  • Sep 11 2018
  • Attach files