---
title: Godo
description: Official Go client for the DigitalOcean API. Install with go get, authenticate with a personal access token, and call API operations with godo.Client.
product: Reference
url: https://docs.digitalocean.com/reference/godo/
last_updated: "2026-10-21"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# Godo

Godo is DigitalOcean’s official Go client library for the DigitalOcean API.

## Installation

Install the module:

```bash
go get github.com/digitalocean/godo
```

## Quickstart

Authenticate with a [personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md). Set your token as an environment variable before running the example:

```bash
export DIGITALOCEAN_TOKEN=<your-api-token>
```

Create a client and list your Droplets:

```go
package main

import (
    "context"
    "fmt"
    "os"

    "github.com/digitalocean/godo"
)

func main() {
    client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))

    droplets, _, err := client.Droplets.List(context.Background(), &godo.ListOptions{})
    if err != nil {
        fmt.Printf("Error: %s\n", err)
        return
    }

    for _, d := range droplets {
        fmt.Printf("%d: %s\n", d.ID, d.Name)
    }
}
```

## More Information

[GitHub - digitalocean/godo](https://github.com/digitalocean/godo): The Godo GitHub repository.

[pkg.go.dev reference](https://pkg.go.dev/github.com/digitalocean/godo): Full Go package documentation for Godo.

[SDK and Client Libraries](https://docs.digitalocean.com/reference/libraries/index.html.md): All official and community client libraries.