Token based authentication

To authenticate against MetroLeads, you need an API access token for the user and email.

You can obtain a token by sending a request to

MetroLeads expects for the authorization to be included in all API requests to the server in a header using the Basic access authentication format like:

Authorization: Basic <base64 encoded email:access_token>

More information on HTTP Basic Authentication is available here

# With shell, you can just pass the email and token with each request
curl -u ""

Issuing auth tokens

Tokens are valid by default for 2 weeks. Tokens can be issued by using the following API:

Resource URL

GET /auth/issue_token?username=<username>&password=<password>


Parameter Description
username required Username of the user. In our case, it is an email.
password required Password of the user

Example Request

curl ""

Example Response