How to Enable Vultr API Access for Users

Updated on November 15, 2024

Application Programming Interface (API) access allows users to access the Vultr account programmatically. The Vultr API works with various clients, such as the Linux Curl command, Vultr CLI, and modern programming language libraries.

Follow this guide to enable API access for users using the Vultr Customer Portal, API, and CLI.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Account and select Users under OTHER.

  2. Select the user from the list and click the Edit icon.

    User's List

  3. Click Enable API under User API Key.

    Enable API

  1. Send a GET request to the Get Users endpoint and note the user ID.

    console
    $ curl "https://api.vultr.com/v2/users" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a PATCH request to the Update User endpoint and specify the user ID to update the user.

    console
    $ curl "https://api.vultr.com/v2/users/{user-id}" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "api_enabled" : true     
        }'
    

    Visit the Update User endpoint to view additional attributes to add to your request.

  1. List all users and note the user ID.

    console
    $ vultr-cli users list
    
  2. Update the user by specifying the user ID.

    console
    $ vultr-cli users update user-id \
    --api-enabled="true"
    

    Run vultr-cli users update --help to view all options.