Getting Started
The WorkGuru API reference can be found here. Before you can use the API, you must first create an API key through the API key dashboard. You must be logged in to the relevant tenancy and have been granted the relevant permissions in order to access that dashboard and create a new key.
NOTE: API keys are considered a user for billing purposes and will fill an active-user slot for the tenancy subscription.
Authentication
The WorkGuru API uses the bearer token method to authenticate your access with the platform. Once you've created a key, it's time to authenticate.
Pass your API key and secret to the TokenAuth endpoint. A sample ajax request is below:
function authenticate() { $.ajax({ method: "post", headers: { Accept: "text/json", "Content-Type": "application/json", }, url: "https://api.workguru.io/api/ClientTokenAuth/Authenticate/api/client/v1/tokenauth", data: JSON.stringify({ apiKey: "YOUR API KEY", secret: "YOUR SECRET KEY" }), success: function (e) { /*Do something with your returned token;*/ }, }); }
Once you've received your bearer token, you will then need to authenticate subsequent API requests by passing it in as a header on your requests. A sample ajax request is below:
function getAssets() { $.ajax({ method: "get", url: "https://api.workguru.io/api/services/app/Asset/GetAllAssets", success: function (e) { /*Do something with your result*/ }, headers: { "Content-Type": "application/json", Authorization: "Bearer YOURTOKENERE", }, }); }
Troubleshooting
The most common cause for issues when using the API are caused by skipping the authentication step. If you have successfully authenticated but are still experiencing issues, send an email to support@workguru.io for assistance.
NOTE: Assistance will be provided for the use of the API, however the development of a third party integration is the responsibility of the third party. If you do not have development resources available, we have a number of partners we can recommend to help facilitate a solution for you.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article