Skip to main content

Authentication

The Vetrol API uses HTTP Basic Auth to authenticate all requests. Your Account SID acts as the username and your Auth Token acts as the password.

Basic Auth

Pass your credentials with every request using Basic Auth:

curl -X GET https://api.vetrol.io/v1/messages \
-u "$VETROL_ACCOUNT_SID:$VETROL_AUTH_TOKEN"

Most HTTP libraries and SDK clients handle Base64 encoding automatically when you provide a username and password.

Unauthenticated requests

Requests without valid credentials return a 401 Unauthorized response:

{
"error": "unauthorized",
"message": "Invalid credentials. Check your Account SID and Auth Token.",
"status": 401
}

Best practices

  • Store credentials in environment variables, never in source code
  • Rotate your Auth Token periodically and immediately if compromised
  • Use separate Vetrol accounts (or sub-accounts) for development, staging, and production