The Authorise User API request must be sent before all other API calls in order to retrieve a token ID. An example of the token ID can be seen at the bottom of this page under the correct request example.
If you have any issues with this please contact fleetsupport@motia.com with an example of the API call and response you have received.
Service URL
https://ws.mycubo.online/IntegrationService.svc
***Must be a GET method request, for testing purposes we recommend using Postman https://www.postman.com/ to simulate the API calls***
Service method and input parameters
AuthorizeUser(string username, string password)
- username – example INTG-test-user (this is provided by Motia Fleet Support and should start with INTG)
- password – example password123 (this is provided by Motia Fleet Support)
Service response
- ErrorMessage - empty for successful call
- Token - Access Token For APi Call
Sample Response – Invalid Credentials
Contact fleetsupport@motia.com and verify your login credentials are correct, or that the user account is active.
Request
Response
{
"Token": null,
"ErrorMessage": "Login failed. Please enter valid username and password."
}
Sample request – User Does Not Have Permissions
Request fleetsupport@motia.com enabled the user account for Motia WS access
Request
https://ws.mycubo.online/IntegrationService.svc/AuthorizeUser?username=INTI-test-user&password=password123
Response
{
"ErrorMessage": "User does not have permission.",
"Processed": false,
"Token": “”
}
Sample request – Too Many Requests Per Minute
Reduce down the frequency of your authentication request one calls, the token stays active for 60 mins.
Request
https://ws.mycubo.online/IntegrationService.svc/AuthorizeUser?username=INTI-test-user&password=password123
Response
{
"Token": null,
"ErrorMessage": "Last request was 3 seconds ago. Request is allowed once per
60 second period."
}
Sample request – Correct Request
Request
https://ws.mycubo.online/IntegrationService.svc/AuthorizeUser?username=INTI-test-user&password=password123
Response
{
"ErrorMessage": null,
"Processed": true,
"Token": "$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS"
}
***Please note - the token will remain active for approximately 1 hour, or alternatively can be called before every subsequent API call***
Comments
0 comments
Article is closed for comments.