Steps to get up and running (Type 5 integration + Type 3 integration)
Steps to get up and running (Type 5 integration + Type 3 integration)
Please note this article only covers few apis for type 3 and type 5 integrations, there are more apis of type 3 and type 5 integrations covered in the following link: type 3 documentation and type 5 documentation
In this integration, there wont be a saams ui like the previous types of integration. Regarding the partner application, you can either use spintly partner apis and spintly partner mobile app.
- Make sure you have a Spintly account created for you, if account is not created please contact our sales team(sales@spintly.com)
- The team will be giving you postman collection, sample mobile app and a backend clientid and clientSecret for backend apis, also the team will be providing the mobile clientid and mobile provider id for the sdk, and also will be giving a program to generate token (in go, python, nodejs), the team will be also be shipping access point to you
- Using the clientid and client secret to generate a token
- Once you get the token, next call the create organisaiton api, when creating the organisation you need to specify the sites which the organissation will have
5) Verify the same organisation in spintly partner website if it is created
6) Next you need to add an access point to the network under the site of the organisation and configure it using spintly partner app. this step you can ask spintly support to guide you or you can refer spintly partner app guide to add and configure the device. Please refer the following link on how you can add different configuration of access points, below is an example of how you can add a controller with a reader
8) Configure the access point devices using the spintly partner app, this step you can ask spintly support to guide you or you can refer spintly partner app to configure the device. (this functionality is also available in Spintly partner sdk which you can use it your own app)
7) You can next call the Create a gateway in the same network where the above access point was added,
8) Just like the access point the gateway also needs to be configured using the partner app (this functionality is also available in Spintly partner sdk which you can use it your own app)
7) You can next call the Create accessor api, to create an accessor, make sure you specify the necessary permissions and also make sure in indentity Info section in provide field you provide the mobile provider id given in step 2, and sub should be userid which uniquely identifies the user in your system, once the accessor is created, a accessorid will returned in the reposne, this accessorid needs to be mappped to the userid in your system
The following steps(8 and 9) are needed only if you are going to use spintly mobile sdk in your app
8) Next you have to create the token using the program spintly has given in point 2(eventually once the poc is done, the creation of tokens the client has to handle in its backend), currently spintly has created its own private key for the client to generate the token.
Below is how a token is generated in nodejs, as you can the sub is same as the userid, mention in point 7
And once you decode the token, it looks like something like below
9) Next install the spintly sample app which was provided in point 2, once you install the sample app, make sure you insert the Mobile clientId, mobile provider id from point 2 and also token generated in point 10. Here region will be "in" if it is india or “us” if it is united states, env will be either stage1 or prod depending on the enviroment
10) Once the above details are put, click on login, once logged in you will see all the access points assigned to you, you can ciick on the access point shown in the ui or you can tap the phone on the reader
11) If you need the access history, u need to provide spintly with a url, and whenever an access is done, the access history will be forwarded to the the url
12) Assigning card to the accessor, here you need specify the accessorid, credential id is notheing but the card number
Below is the image of the card