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 support@metroleads.com.

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 john@example.com:3c11441f-284c-4f12-9c83-4d1ef160d5e1 "https://api.metroleads.com/"

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>

Parameters

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

Example Request

curl "https://api.metroleads.com/auth/issue_token?username=john.doe@initech.com&password=p@ssw0rd"

Example Response

"1bfe5fd7-019c-4c70-93ef-d1a6d3d77171"