Getting Started with XFA API
Welcome to the XFA API Documentation, the XFA API can be used by costumers, partners, and vendors to interact and expand the XFA platform to extract reports, automate actions & more.
This documentation includes specific information about the authentication required, some example usecases and an API playground to dynamically test out the API endpoints & functionality.
Authentication
Step 1: Create Your Service Account
- Go to your XFA dashboard
- Click on Settings → Admin → Add an Admin
- Create your service account using email and password
- ⚠️ IMPORTANT: You MUST use email/password authentication
- 🔒 Store these credentials securily
- 🚫 Never share these credentials with anyone
Step 2: Get Your Authentication Token
To interact with the XFA API, You'll need to obtain an authentication token using the email/password from the previous step. Here's a detailed breakdown of the authentication process:
-
URL:
https://cognito-idp.eu-west-1.amazonaws.com/
-
Headers:
x-amz-target: AWSCognitoIdentityProviderService.InitiateAuth
-
Request Body (sent as JSON):
AuthFlow
: "USER_PASSWORD_AUTH" - Specifies we're using username/password authenticationClientId
: "5svu9bb7s7gvmq404ilp0mrul2"AuthParameters
: Contains the credentialsUSERNAME
: Your email addressPASSWORD
: Your password
Upon successful execution, the command will return an access token that you can use for subsequent API calls to the XFA platform.
- Open your terminal or API testing tool
- Use this command (replace the placeholders):
curl -X POST https://cognito-idp.eu-west-1.amazonaws.com/ \
-H "x-amz-target: AWSCognitoIdentityProviderService.InitiateAuth" \
-d '{
"AuthFlow": "USER_PASSWORD_AUTH",
"ClientId": "5svu9bb7s7gvmq404ilp0mrul2",
"AuthParameters": {
"USERNAME": "YOUR_EMAIL",
"PASSWORD": "YOUR_PASSWORD"
}
}'
- You'll receive a response like this, you'll need the AccessToken for API calls:
{
"AuthenticationResult": {
"AccessToken": "eyJraW......",
"ExpiresIn": 3600,
"IdToken": "eyJraWQiO.......",
"RefreshToken": "eyJjdHki.........",
"TokenType": "Bearer"
},
"ChallengeParameters": {
}
}
Your token will expire after 1 hour. Make sure your application can request a new token when needed!
Use the API Playground
Want to test the API without writing code?
- Go to our API Playground
- Enter your token in the "Authentication" section
- Try out any endpoint with just a few clicks!
Customize your experience
You can change the programming language for code examples using the selector at the top of the page. This will update all code examples throughout the documentation to match your preferred language.