Getting Started With Your API

How to create and use the API token: the values you receive from MyRent, the token flow and token lifetime.

The Auth API creates the short-lived token that the account-based MyRent APIs (User API, Messages, Customer API, Registars) need in the token header.

Before you start

MyRent enables API access for the account and gives you, together with a ready cURL command:

ValueUse
API keyAuthorization header of the Auth API (without Bearer).
user_guiduser_guid header of the Auth API and of all later calls.
user_idBody of Generate token.
public_key, auth_keyBody of Generate token.

Flow

  1. Call Generate token with the values above. The response is { "token": "..." }.
  2. Send user_guid and token as headers in every API call that needs them.
  3. The token is valid for 1 hour. Cache it and create a new one about every 45 minutes. Do not create a token for every request.
  4. Optionally check a token with Validate token.

Wrong or missing Auth API headers return 404 with an empty body; wrong keys return 403.

🚧

Keep credentials private

Keep the API key, public_key and auth_key on your server. Never put them into browser or mobile app code, and never log them.