[POST] Create a user authentication token

Modified on Tue, 11 Feb at 3:40 AM


https://auth.s7risk.com

The Auth API provides authentication and authorization support to our suite of APIs.

The default method of authentication against all Intelligence Fusion APIs is done through a stateless JWT token provided as an Authorization: Bearer header. The documentation below provides support for creating user tokens for user initiated communication and application tokens for machine to machine communication.

 

POST /user/token Create a user authentication token

This endpoint creates an authentication token for use as the Authorization bearer token in the header when making further API requests.

All tokens have a 24-hour lifespan. You must re-generate your authentication token every 24-hours.

HTTP Request

curl -X POST 'https://auth.s7risk.com/user/token' \
  -H 'Content-Type: application/json' \
  -H 'Origin: {{YOUR_API_DOMAIN}}' \
  --data '{
    "email":"{{YOUR_EMAIL}}",
    "password":"{{YOUR_PASSWORD}}"
  }' \
  --compressed

Headers

NameTypeRequiredDescription
Originstring✔️Your API domain

Body

NameTypeRequiredDescription
emailstring✔️The email address for the user
passwordstring✔️The password for the user

HTTP Response

{
    "status": "success",
    "data": {
        "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9…"
    }
}

Success

CodeStatusDescription
200SuccessReturns a body containing your valid accessToken

Errors

CodeStatusDescription
401UnauthorizedEmail and password do not match
401UnauthorizedUser access window has expired
422Unprocessable EntityMissing password request body parameter
429Too Many RequestsToo many authentication attempts. Try again in 5 minutes

POST /application/tokenCreate an application authentication token


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article