flexiPIM uses an access token for API authentication. The token is provided to stakeholders at the time of delivery.
They can also get this token from their flexiPIM access site. Refer flexiPIM documentation
to know how to get Access
Token from the flexiPIM app.
{warning} Please note that the
Base URL
for endpoint
https://example.flexipim.com/api/v2
token : "your-flexiPIM-API-token"
Step 1: Login into your flexiPIM Instance
Step 2: Goto top right corner of the header
Step 3: Click profile icon button, it shows dropdown and then
Step 4: Click 'Site Info' dropdown menu
Step 5: 'Site Info' page appears
Step 6: Goto 'API Token' tabs, In text field box 'API Token' appears
Step 7: In text field box click and select all to copy your token
Step 8: If you want to generate a new token, Click 'Generate New Token' button
Above said API token has to be passed in every flexiPIM API call for authentication.
var form = new FormData();
form.append("channel", "2");
var settings = {
"async": true,
"crossDomain": true,
"url": "http://client.flexipim.com/api/v2/attributes",
"method": "POST",
"headers": {
"token": "your api access token"
},
"processData": false,
"contentType": false,
"mimeType": "multipart/form-data",
"data": form
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Method | URL |
---|---|
POST | /checkConnection |
var form = new FormData();
var settings = {
"async": true,
"crossDomain": true,
"url": "http://client.flexipim.com/api/v2/checkConnection",
"method": "GET",
"headers": {
"token": "your-flexiPIM-api-token",
"cache-control": "no-cache",
"postman-token": "34d18a86-0a04-1a66-cb61-7f229038b0ab"
},
"processData": false,
"contentType": false,
"mimeType": "multipart/form-data",
"data": form
}
$.ajax(settings).done(function (response) {
console.log(response);
});
{success} Success Response
{
"success": true,
"data": "Connection Established Successfully",
"message": "Connection Established Successfully"
}
{danger} Error Response
{
"success": false,
"message": "Error.",
"data": "token mismatch"
}