Authentication

The 4N NextDay API uses bearer tokens for authentication. Your token is provided by a NextDay system administrator — no login endpoint is needed.

Use the token in requests

Include the token in the Authorization header of every API request:

Authorization header format

Authorization: Bearer 1|abc123def456...
GET
/orders
curl https://api.4nortes.app/api/v1/orders \
  -H "Authorization: Bearer 1|abc123def456..." \
  -H "Content-Type: application/json"

Headers to include

Every request needs these headers:

HeaderValueDescription
AuthorizationBearer {token}Your bearer token provided by your NextDay administrator
Content-Typeapplication/jsonRequired for POST/PUT requests
Acceptapplication/jsonRecommended for all requests

If authentication fails

You'll get a 401 Unauthorized response:

401 Unauthorized Response

{
  "success": false,
  "message": "Unauthenticated.",
  "errors": null
}

This usually happens because:

  • Missing header: You forgot to include Authorization
  • Wrong format: Make sure it's Bearer {token} (with the space)
  • Revoked token: Contact your NextDay administrator for a new token

Keep your token safe

  1. Use environment variables: Don't hardcode the token
  2. Token renewal: Contact your NextDay administrator if your token is revoked or needs to be replaced
  3. Separate tokens: Use different tokens for testing vs production
  4. Monitor usage: Check your panel for unexpected activity

Using environment variables

# Set your token as an environment variable
export NEXTDAY_TOKEN="1|abc123def456..."

# Use it in your requests
curl https://api.4nortes.app/api/v1/orders \
  -H "Authorization: Bearer $NEXTDAY_TOKEN"

Was this page helpful?