Discussions

Ask a Question
Back to All

API Error

Hello
I am getting the response bellow when I use “event.auth.accessToken” a bearer token

{
"errorCode": 403,
"message": "insufficient_scope",
"additionalDetails": ""read_job_materials" scope required to complete this request"
}

This is a sample of the get request:
var strJobUUID = event.eventArgs.entry[0].uuid;
request.get(
{
url: 'https://api.servicem8.com/api_1.0/jobmaterial.json?%24filter=job_uuid%20eq%20'+strJobUUID,
headers:
{
accept: 'application/json',
authorization : 'Bearer '+event.auth.accessToken
}
},

Thank you, Mario