Documentation Index

Fetch the complete documentation index at: https://learn.servitly.com/llms.txt

Use this file to discover all available pages before exploring further.

User login (PAT)

Prev Next
Post
/identity/users/patLogin

Authenticates the user in the DPS by using a PAT (Personal Access Token) instead of username and password.
This is the recommended way to authenticate machine-to-machine integrations, since it does not require handling the end-user password and the token can be revoked without changing the user credentials.

The payload must provide both the pat and the apiKey identifying the client application, while the tenant is identified by the X-Servitly-Tenant header.
The response is the same returned by the credentials-based login: the JWT token, its expiration and the data needed to renew it.

Header parameters
X-Servitly-Tenant
stringRequired

The name of the tenant (e.g. acme).

Body parameters

The login PAT and API Key.

object

The payload message for login requests based on PAT.

apiKey
string Required

The API KEY identifying the client.

Example{{apiKey}}
pat
string Required

The PAT used for login.

Example{{userPat}}
Responses
200

Authentication succeeded.

object

The response message for login requests.

token
string

The JWT token to include as the bearer token in authenticated requests.

Example661fd29342541977c4002ec7...
tokenExpirationTimestamp
integer (int64)

The timestamp when the token will expire and must be refreshed.
Generally one hour after issuance, but this may vary over time.

Example1578438000000
refreshToken
string

The refresh token used to request a new JWT token when the current one expires.

Examplecd2bd3a0-861d-4798-8fd6-2a2a99fb92e8
userId
string

The id of the authenticated user.

Example6616689a0de6d87b47cd6308
tenantId
string

The id of the tenant.

Example661533a57bba156cf6e8d04b
401

Invalid credentials, user not authenticated.

object
message
string

The error response.

ExampleInvalid credentials
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error