Discussions
Access Denied Error for API Requests
9 months ago by Marcello Valentini
Dear ServiceM8 Developer Support,
I am reaching out for assistance with an issue I am encountering while developing an add-on for ServiceM8. Specifically, I am experiencing an access_denied error when attempting to access the /v1/jobs.json endpoint and the /v1/tokeninfo.json endpoint.
Details of the Issue
- App Name: Customer Portal
- App ID: 317092
- Redirect URI:
http://localhost:3000/callback - Requested Scope:
read_jobs - Error Encountered:
- Endpoint:
https://api.servicem8.com/v1/jobs.json - Error Response:
<html> <head> <meta http-equiv="refresh" content="0; url=/access_denied?strFrom=%2Fv1%2Fjobs.json"> </head> <body>Page Not Found</body> </html>
- Endpoint:
Steps Taken
- OAuth Authorization: I am successfully obtaining an access token after requesting the
read_jobsscope. - Access Token Details: The token is being passed in the
Authorizationheader for API requests asBearer <token>. - Manifest Configuration: The app manifest includes the correct
scopesfield, as follows:{ "scopes": ["read_jobs"] } - Testing: Despite following the documentation, API requests to both
/v1/jobs.jsonand/v1/tokeninfo.jsonreturn theaccess_deniederror.
Request for Assistance
Could you please help me confirm:
- If the requested scope (
read_jobs) is being correctly granted to my app. - If there are any configuration issues with my app setup in the Developer Portal.
- If there are additional steps required to access the
/v1/jobs.jsonendpoint.
I appreciate your guidance on resolving this issue.
Thank you for your support, and please let me know if you require any additional information.
Best regards,
Marcello
