pydo.account.get()

Description

To show information about the current user account, send a GET request to /v2/account.

Request Sample

import os
from pydo import Client

client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN"))

account_info = client.account.get()

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON object keyed on account with an excerpt of the current user account data.

Click to expand an example response.
{
  "account": {
    "droplet_limit": 25,
    "floating_ip_limit": 5,
    "email": "[email protected]",
    "name": "Sammy the Shark",
    "uuid": "b6fr89dbf6d9156cace5f3c78dc9851d957381ef",
    "email_verified": true,
    "status": "active",
    "status_message": " ",
    "team": {
      "uuid": "5df3e3004a17e242b7c20ca6c9fc25b701a47ece",
      "name": "My Team"
    }
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}