User obtains a user token via Web services
A user who has received an activation code can use it to request a user token. You can find all endpoints on this page.
Test the Web services
In the example below, you see how to access the web service manually and test it on a machine on which Profit has been installed.
This method only works with a local installation, not on AFAS Online. Run this call on the Profit application server.
To request a user token using an OTP:
- Use a URL from the table.
- Click on: 'GetTokenFromOTP'.
- Enter the name of the Profit user in 'userId'.
- Enter the value of apiKey'. in '
- Enter the value of environmentKey'. in '
- In 'otp', enter the OTP that Profit e-mailed to the user.
- Click on: 'Invoke'.
If the call is successful, you receive a return message with the token.
If you granted a token but the user/description does not appear in the properties of the app connector in Profit, close the properties of the app connector and re-open them. This refreshes the view on thetab and lets you see the user/description. You cannot view the token itself, it is only reported back via the web service.
Profit Connector for retrieving a user token for an app connector.
- userId: Name of the Profit user.
- apiKey: of the app connector.
- environmentKey: of the app connector.
- otp: OTP that was sent to the user.