RideWiseCore Docs

Authentication

How your backend authenticates, and why API keys and dashboard logins are kept separate.

RideWiseCore uses service-to-service authentication. Your backend proves who it is with an API key. RideWiseCore never authenticates your riders or agents; that stays with you.

Credential types

CredentialLooks likeWho uses itValid for
API keyrwc_…Your backendMatching and tracking
Dashboard loginEmail + passwordPeople on your teamThe dashboard only. Never matching or tracking

The split is deliberate. Having the dashboard open in a browser tab should not be enough to dispatch rides. Only your backend, holding a real API key, can use the matching and tracking services.

REST requests

Send your key as a Bearer token in the Authorization header on every request:

POST /matches HTTP/1.1
Authorization: Bearer rwc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
SituationResponse
No Authorization header401 Missing API key
Key doesn't exist or was revoked401 Invalid or revoked API key
Valid key, but no payment method on file and no free trial running402 (matching & tracking only)
Valid key, but subscription cancelled or suspended403 (matching & tracking only)

Real-time socket

Pass the key in the Socket.IO auth payload when you connect. RideWiseCore checks the key during the handshake:

import { io } from "socket.io-client";

const socket = io(process.env.RWC_API_URL!, {
  auth: { apiKey: process.env.RWC_API_KEY },
});

socket.on("connect_error", (err) => {
  // err.message: "Missing API key", "Invalid or revoked API key",
  // or a billing message such as "A payment method must be on file…"
});

The same billing checks as the REST API run at handshake time, so a tenant without a payment method, or a cancelled one, can't connect.

The key is checked only when the socket connects. If you revoke a key, restart connections that were opened with it using a new key.

Keeping keys safe

  • Keep keys only on your servers, in environment variables or a secrets manager.
  • Never embed a key in a mobile app, web frontend or public repository. Anyone who has the key can dispatch rides and generate billable usage as you.
  • Use a separate key for each environment or service, labelled so you can tell them apart, for example production-api and staging.
  • Rotate keys periodically, and immediately if you suspect one has leaked. See API keys → Rotating a key.

Rate limits

Every API key is limited to 300 requests per minute across the REST API. When you exceed it, you get 429 Too Many Requests. Wait for the time in the retry-after header, then retry.

Location updates sent over the socket don't count toward this limit.

On this page