Discussions

Ask a Question
Back to All

Adding attachments to a SM8 job

I hope this message finds you well.
I was trying to add an attachment to a Job using the attachment endpoint (ServiceM8 Attachment Documentation). I successfully completed the first request to create the attachment URL and received the "x-record-uuid." Now, I need to add a file to it using the subsequent step mentioned in the documentation.
However, when I try to upload the file, I encounter the following error:
{
"errorCode": 403,
"message": "insufficient_scope",
"additionalDetails": ""manage_attachments" scope required to complete this request"
}
It seems that the "manage_attachments" scope is required for this operation. Unfortunately, I could not find this scope in the list provided in the documentation here: ServiceM8 Authentication Scopes.
Could you please assist me with the following:
The "manage_attachments" scope is not listed. What steps do I need to take to obtain this scope?
Could you provide a cURL request example to add a file to the attachment URL? If there’s an option to add a file using a public URL, I would appreciate that information as well.
I hope you understand my struggle, and I would greatly appreciate your help in resolving this issue.