Authentication

How to get your credentials and authenticate requests to the V4MOS.AI API

How to Get Your Credentials

  1. Go to app.v4mos.ai

  2. Sign in with your credentials.

  3. Open Settings and then the Data API tab.

    Attention

    You need Admin permission in the organization to access and view the Data API tab.

    Opening Settings > Data API on the V4MOS.AI platform

  4. Your credentials (client_id and client_secret) will be generated and shown for you to copy.

Using the Credentials

Include the credentials in every request through the required HTTP headers:

x-client-id: your_client_id
x-client-secret: your_client_secret

Request Example

curl -X GET "https://data.v4mos.ai/v1/google/ads/campaigns?organizationId=organization_123&createdStart=2024-01-01T00:00:00Z&createdEnd=2024-01-31T23:59:59Z&page=1&limit=500&orderBy=metrics_cost&orderDirection=DESC" \
  -H "x-client-id: your_client_id" \
  -H "x-client-secret: your_client_secret" \
  -H "Content-Type: application/json"

Required Parameter: organizationId

Every request requires the organizationId parameter to identify the organization.

Characteristics

  • Must be sent as a query parameter on every request
  • It is required on every call
  • Requests without organizationId return a validation error

Example

GET https://data.v4mos.ai/v1/google/ads/campaigns?organizationId=organization_123&limit=100

Security

  • Keep your credentials safe: Never share or publicly expose your client_id and client_secret
  • Do not version credentials: Never commit credentials to code repositories
  • Use environment variables: Store credentials in environment variables or secret managers
  • Credential rotation: Generate new credentials periodically
  • Revocation: If your credentials are compromised, generate new ones on the platform immediately

Authentication Errors

Missing or Invalid Credentials

HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "message": "Unauthorized"
}

Missing organizationId

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "error": "Validation Error",
  "message": "O parâmetro organizationId é obrigatório"
}

The message of validation errors is returned in Portuguese by the API.

On this page