Skip to main content

Authenticate

We utilize JSON Web Tokens to authenticate all requests sent to the API.

Step 1

Retrieve your admin credentials that have been provided for your firm.

Step 2

API Reference: Login API

Create a POST request with your username and password.

Example cURL request:

curl 'https://userapi-demo.s2f.projectx.com/login' --header 'Content-Type: application/json' --data-raw '{"username": "username", "password":"password"}'

Step 3

Process the API response, and make sure the result is Success (0), then store your session token in a safe place. This session token will grant full access to the Admin API.

Final Step

All further requests will require you to provide the session token in the "Authorization" HTTP header using the Bearer method.

Example cURL request:

curl -i https://userapi-demo.s2f.projectx.com/Session/validate -H "Authorization: Bearer [[TOKEN]]"

Notes

Session tokens are only valid for 24 hours. You must revalidate your token to continue using the same session.

The next step will explain how to extend / re-validate your session in case your token has expired.