Omnibasis API can be accessed via token based authentication. You can build your own application that authenticate and use any functionality in the Omnibasis as API. 


For instance, you can create a mobile application that consumes the same API as Omnibasis User Interface. 


Below we'll demonstrate usage of the API from Postman (free API development and testing environment).


Authentication

We suggest you to disable two factor authentication for the user which will be used for remote authentication. Otherwise, two factor authentication flow should be implemented by the client. We assume that you have disabled two factor authentication for the admin user of your business account since we will use it in this sample.


You can see details of API call here:

https://api.omnibasis.com/explorer/index.html?urls.primaryName=Omnibasis%20Session%20API


Step 1: Configure request url.


The following url should be used, make sure you selected POST method from the dropdown.


https://api.omnibasis.com/session/TokenAuth/Authenticate



Step 2: Configure request headers


Following headers should be configured for all requests including your business id via "Abp.TenantId":



Note: you can find your business id under 'omniSite \ Settings'



Step3: Configure request body


TIP: You can use Omnibasis API explorer to explore the POST request body and copy and paste. Do not forget to set default values.


Then we can send username and password as a POST request to. Navigate to Body tab and write the following body:

{

"userNameOrEmailAddress": "admin",

"password": "yourpasswordhere",

"twoFactorVerificationCode": "",

"rememberClient": true,

"twoFactorRememberClientToken": "",

"singleSignIn": false,

"returnUrl": ""

}




Step 4: Click send to post request to Omnibasis. 


If you provided correct username and password, you should get back the response with accessToken. 


In the returning response, accessToken will be used to authorize for the API.