Saltar al contenido principal

Authentication

Every partner route on the VIVIN API is called with a partner token that VIVIN issues for your platform.

Before you start​

ItemValue
Who it is forBooking platforms, booking engines and other partners that read listings or send bookings
Base URLhttps://api.vivin.app, HTTPS only
RoutesEverything under your route prefix, for example /uniplaces-integration/… (see route prefixes)
CredentialA partner token. VIVIN issues it during onboarding: ask through Get help and support
Not forLandlords scripting their own account (Management session) or AI clients (MCP OAuth)

The token identifies your platform, not one landlord. It reads the linked units of every VIVIN account that works with your platform (see Property and unit mapping). A single-landlord feed has its own prefix and its own token, tied to one account on VIVIN's side.

Credentials by route​

RouteSend
Every route under your prefixAuthorization: Bearer <partner-token>
Any /uniplaces-integration/… routeThe header above, or x-api-key: <webhook-key> with the webhook key VIVIN agreed with Uniplaces
POST /vivin-booking-engine-integration/property-listingThe header above and vivin-api-key: <account-key>, which picks the landlord account
/ical-integration/…Nothing. The unit ID in the URL is the only secret (iCal feeds)

Send the partner token​

Put the token in the Authorization header of every request.

GET /uniplaces-integration/listings HTTP/1.1
Host: api.vivin.app
Authorization: Bearer <partner-token>
curl https://api.vivin.app/uniplaces-integration/listings \
-H "Authorization: Bearer <partner-token>"
  • Write Bearer with a capital B, then exactly one space, then the token. bearer <partner-token> and two spaces are both rejected.
  • Send the same header on every route under your prefix: the listing feeds, the full feeds, POST …/bookings and, if your platform has one, the inbound webhook. Use the token only under your own prefix.
  • The token is a signed string. Treat it as opaque: do not decode it or build logic on its contents.

The x-api-key header (Uniplaces)​

Uniplaces can authenticate with a webhook key instead of the partner token, on any Uniplaces route.

HeaderValue
x-api-keyThe webhook key VIVIN agreed with Uniplaces. Spaces around it are ignored
x-api_keyAccepted as another name for the same header

When the key matches, the request is accepted without an Authorization header. When it does not match, VIVIN checks Authorization as usual, so a wrong webhook key with no partner token returns 401 Missing integration credentials.

The vivin-api-key header (Vivin Booking Engine)​

POST /vivin-booking-engine-integration/property-listing creates a property in one landlord account. The partner token alone does not say which, so the route also needs that account's key.

HeaderValue
vivin-api-keyThe landlord account's key. VIVIN sets it. The landlord sees only its last characters, as the read-only Integration API key on the Vivin Booking Engine card under Settings → Integrations → Booking Platforms
  • Swagger's Authorize button sets only the partner token. Test this route with a client such as curl.
  • On every booking-engine route, a vivin-api-key whose account now uses VIVIN's native booking engine returns 410 (Booking Engine API).

Test your token in Swagger​

Each prefix has a live Swagger page at https://api.vivin.app/<prefix>, for example https://api.vivin.app/uniplaces-integration.

  1. Open your platform's Swagger page.
  2. Click Authorize.
  3. Paste the token without the word Bearer. Swagger adds it; pasting Bearer <partner-token> sends the word twice and returns 401.
  4. Click Authorize, then Close.
  5. Expand GET /listings, click Try it out, then Execute.

A 200 means the token works. A 401 means it does not: see Errors.

Errors​

An authentication failure on a partner route always returns 401, never 403, with the standard error body:

{
"statusCode": 401,
"message": "Missing integration credentials",
"error": "UnauthorizedException"
}
StatusmessageCauseWhat to do
401Missing integration credentialsNo Authorization header (and, on Uniplaces routes, no matching x-api-key)Add the header
401Invalid integration credentialsThe header is not Bearer <token>: wrong word or case, more than one space, or nothing after BearerSend exactly Bearer, one space, and the token
401UnauthorizedThe token is not valid here: a typo, a replaced token, or Bearer typed twiceCheck the prefix and the token. If it still fails, ask VIVIN for a new token
401Missing vivin-api-key headerPOST /vivin-booking-engine-integration/property-listing without vivin-api-key, or with an empty oneAdd the landlord account's key
401UnauthorizedPOST /vivin-booking-engine-integration/property-listing with a vivin-api-key that matches no accountCheck the key with the landlord or VIVIN
503This integration is not configured yet. Contact VIVIN support.A single-landlord feed that VIVIN has not finished setting up. Your token is fineContact VIVIN. Retrying does not help

Other status codes are in Error handling.

Limits and retries​

  • Partner routes are not rate-limited, so they never return 429. How often to poll is covered in Keeping in sync.
  • A 401 is final: retrying the same request returns the same 401. Fix the header first.
  • VIVIN sets the token's lifetime when it issues it. If a token that worked starts returning 401 Unauthorized, ask VIVIN for a new one.

Keep the token safe​

  • Keep it on your server, in a secrets manager or server-side configuration. Never put it in a browser app, a mobile app or a public repository.
  • Call the API over HTTPS only.
  • If you think a token has leaked, contact VIVIN to replace it.
  • The token opens only partner routes. The VIVIN app's own routes need a management session.

Troubleshooting​

SymptomLikely cause and fix
401 Unauthorized in Swagger, but curl worksBearer was pasted into the Authorize dialog. Paste the token only
401 Invalid integration credentials from your HTTP clientThe client lowercases Bearer or adds a second space. Build the header by hand
401 Missing integration credentials on the Uniplaces webhookThe x-api-key value does not match the agreed key, and no Authorization header was sent
401 Missing vivin-api-key header in SwaggerSwagger cannot send that header. Use curl
503 This integration is not configured yet…The single-landlord feed is not live yet. Contact VIVIN