Skip to main content

Authentication

Authentication for the Ordering Channel API is configured per-partner during integration setup.

Overview

OneTablet supports multiple authentication methods depending on your platform's requirements. The specific method will be determined during your integration onboarding.

Inbound Authentication (Your Requests to OneTablet)

When your platform calls OneTablet endpoints (e.g., pulling menus), authentication is configured during integration:

MethodDescription
API KeyInclude key in x-api-key header
Bearer TokenInclude token in Authorization: Bearer {token} header
CustomOther methods as agreed during integration

Example with API Key

curl -X GET "https://integration.onetablet.example/pull/menus/store-123" \
-H "x-api-key: your-api-key"

Outbound Authentication (OneTablet Calls to You)

When OneTablet calls your webhook endpoints (order confirmation, menu push, etc.), you configure how we authenticate:

MethodDescription
API KeyOneTablet includes key in request header
Bearer TokenOneTablet includes JWT in Authorization header
CustomOther methods as agreed during integration

Verifying OneTablet Requests

You should verify incoming webhook requests from OneTablet by:

  1. Checking the authentication header configured during integration
  2. Validating source IP against OneTablet's IP allowlist (provided during setup)
  3. Confirming the store ID matches your account

Request Headers

All API requests should include:

HeaderValueRequired
x-api-key or AuthorizationAuthentication credentialsYes
Content-Typeapplication/jsonYes (for POST/PATCH/PUT)
User-AgentYour application identifierRecommended

Error Responses

401 Unauthorized

Returned when authentication fails:

{
"error": "Unauthorized",
"message": "Invalid or missing authentication"
}

Common causes:

  • Missing authentication header
  • Invalid API key or token
  • Expired credentials

403 Forbidden

Returned when the authenticated user lacks permission:

{
"error": "Forbidden",
"message": "Access denied to this resource"
}

Security Best Practices

  1. Never expose credentials in client-side code or public repositories
  2. Use environment variables to store credentials
  3. Rotate credentials periodically
  4. Use HTTPS for all API communication
  5. Implement retry logic for authentication errors

Getting Credentials

Contact OneTablet technical support to:

  • Obtain your API credentials
  • Configure authentication method
  • Receive IP allowlist for webhook verification
  • Set up sandbox environment access