Discussions
OAuth Token Access Denied Issue - App ID 133481
6 days ago by Martin
Dear ServiceM8 Support,
I'm experiencing an issue with OAuth API access for our registered application (App ID: 133481).
Problem Description:
- Successfully obtained OAuth access token through authorization code flow
- Token: 93737-euw2-5727568161b03275e7b676c2f48da2056e02992b
- When making API calls with Bearer token, receiving "access_denied" redirect
- API endpoint tested: https://api.servicem8.com/api/1.0/staff.json?limit=1
Application Details:
- App ID: 133481
- App Type: Web Service Hosted Add-on
- OAuth Scopes Requested: read_staff staff_activity read_jobs read_job_categories read_schedule read_customers read_job_queues read_tasks
- Redirect URI: http://localhost:5000/auth/servicem8/callback
API Response:
The API returns HTML with meta refresh to /access_denied page instead of JSON data.
Questions:
- Are there additional permissions needed for the OAuth token to access staff data?
- Is there a specific API endpoint or header format required for OAuth authentication?
- Do we need to activate additional features for our application to access the API?
Testing Done:
- Verified token exchange successful with correct scopes
- Confirmed Bearer token format in Authorization header
- Tested with proper Accept: application/json headers
We're building a team performance dashboard that needs to read staff timesheet and job data. Any guidance on resolving this access issue would be greatly appreciated.
Best regards,
Team Performance Dashboard Development Team