[POST] Create an application authentication token

Modified on Tue, 11 Feb at 3:39 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/tokenCreate a user authentication token

POST /application/tokenCreate an application 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/application/token' \
  -H 'Content-Type: application/json' \
  -H 'Origin: {{YOUR_API_DOMAIN}}' \
  --data '{
    "clientId":"{{CLIENT_ID}}",
    "secret":"{{CLIENT_SECRET}}"
  }' \
  --compressed

Headers

NameTypeRequiredDescription
Originstring✔️Your API domain

Body

NameTypeRequiredDescription
clientIdstring✔️The ID for the application
secretstring✔️The secret key for the application

HTTP Response

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

Success

CodeStatusDescription
200SuccessReturns a body containing your valid accessToken

Errors

CodeStatusDescription
401UnauthorizedClient ID and secret do not match
422Unprocessable EntityMissing client ID body parameter


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