Authentication

In order to make requests, you will first need to get a token that validates your identity. You get a token by authenticating with your user credentials. Once you have it, every request made to the API has to include it as part of the Authorization header as Bearer <your token>.

These requests are made at our Identity Service, there are three to choose depending on wich evironment you are using:

  1. https://login.delagerx.com (Production)
  2. https://login.test.delagerx.com (Tests)
  3. https://login.dev.delagerx.com (Development)

Authenticated requests are made with a JWT bearer token. To generate them you will have to provide your user credentials:

curl -X POST -H "Content-Type: application/json" -d 
'{ "username": "YOUR EMAIL", 
   "password": "YOUR PASSWORD" 
}' 
"https://login.dev.delagerx.com/connect/token"

The response should look something like this:

{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkYxMDMyQzc1ND...",
    "expires_in": 3600,
    "token_type": "Bearer"
}

The tokens will eventually expire and you will need to generate new ones after the period described in seconds at the expires_in property.