Skip to main content
Instead of asking a restaurant to create an API key and paste it into your product, your application can send the user to EatNow, let them pick a restaurant and approve the permissions, and receive a token. EatNow implements the OAuth 2 authorization code grant (RFC 6749) with PKCE S256 (RFC 7636), mandatory. The access token you receive is a partner API key for one restaurant: it works with every Partner API route allowed by its scopes, exactly like a key created by hand. It does not expire and there is no refresh token; it stops working when it is revoked.

Register your application

Applications are registered by EatNow. Send us your application name, its logo, the redirect URIs (compared character for character: scheme, host, port, path and query) and the scopes you need. You receive a client_id and a client_secret, shown once: keep the secret on your server only.
An application published by EatNow (such as ClubNow) works on every restaurant. A third-party application also requires the restaurant’s API option, like a hand-made key.
Generate a code_verifier (43 to 128 characters among A-Z a-z 0-9 - . _ ~) and a random state, keep both in the user’s session, then redirect the browser to:
The user signs in if needed, sees your application and the permissions it asks for, chooses a restaurant among those where they may manage integrations, then clicks Allow or Deny.

2. Handle the return

EatNow redirects the browser to your redirect_uri with state and either a code, or an error: An unknown or disabled client_id, or a redirect_uri that is not registered, is never redirected: the user sees the error on EatNow. The code is valid 5 minutes and once.

3. Exchange the code for a token

From your server, POST https://app.eat-now.io/api/oauth/token with application/x-www-form-urlencoded (JSON is also accepted). Authenticate the client with HTTP Basic (client_id:client_secret, each form-encoded) or with client_id and client_secret in the body, not both.
The response carries Cache-Control: no-store. Store the token server-side, with the restaurant id.
A code presented a second time is refused and the token it issued is revoked. Never retry an exchange that may have succeeded: if the response was lost, send the user through the consent page again.

4. Call the Partner API

With WEBHOOKS_WRITE, subscribe an HTTPS URL to events with POST /api/partner/v1/webhook-endpoints. The signing secret is returned only in that response. Each event type needs the matching read scope, and contact details are included in payloads only with RESERVATIONS_READ_SENSITIVE. See Manage endpoints through the API.

Connection lifecycle

  • Reconnection. A new authorization for the same restaurant does not revoke the previous token: once the new connection is in place, revoke the previous token with POST /api/oauth/revoke (below). At most 3 tokens stay active per restaurant and application: issuing a fourth revokes the oldest and deletes the webhook endpoints it created.
  • Disconnection by the restaurant. Settings › Integrations › Connected apps lists the connected applications; Disconnect revokes every active token of the application on that restaurant and deletes their webhook endpoints. Your calls then return 401 INVALID_AUTHENTICATION: ask the user to connect again.
  • Disconnection by your application. POST /api/oauth/revoke (RFC 7009) with token and the same client authentication as the token endpoint. The answer is 200 even for an unknown or already revoked token.