All requests to MachShip API require a valid API token. This token can be generated by logging in to MachShip and adding a new token to your user account.
Generate a valid API token via the View User page
Firstly, you need to access your user list by navigating to the Admin menu and View Users.
Alternatively, you can access the page via the following link.
Note: Should your user not have permission to access this page, then you will be unable to access this link.
From the Users Page, you will see the user list page with all the users that your organisation has access to (parent and child company). Using the company filter and the search bar, find the user you wish to create an API Token.
Click on the cog button corresponding to the user you want to create the API token and choose View User.
On the View User page, scroll down to navigate on the API Tokens section. The sample screenshot shows that there is no API Token for the user yet. To create one, please click on Create Api Token button.
You will see a pop up dialog box like the below image:
You will need to type in a Token Name. Note that it needs to be unique as it will be a way for MachShip to identify and show up in the history logs.
Click on Create Token button to generate the API Token.
If you see the sample error message from the below screenshot, it means the name is already taken and that you will need to enter another name.
When the token is generated successfully, you will see a screen similar to the below:
You can copy the Token by highlighting the text field and press ctrl + C buttons or click on the blue copy icon button to automatically copy the token.
Note: You will need to note down the generated API Token and store the token value for safekeeping as its Read Only and you will not be able to view the Token value again, else, you will need to re-generate a new API Token.
Once copied, you are ready to connect to the MachShip API.
How to Revoke an API Token via the View User page
From the Users Page, you will see the user list page with all the users that your organisation has access to (parent and child company). Using the company filter and the search bar find the user you wish to revoke API access for and through the drop-down cog select View User.
On the View User page, scroll down to navigate on the API Tokens section. You will see a list of all created API tokens and their current status.
To revoke access of the user API token to the MachShip API, simply click on the the drop-down cog button on the right corner and select Revoke API Token.
This will prompt the Revoke User Api Token modal to appear, whereby you will need to confirm if you wish to revoke the Token access. Select Revoke User Api Token button to confirm.
The token will then be revoked and the Date Revoked column will be populated with the revoked date.