You need to obtain an access token
The file data needs to be a base64 encoded string
To attach a file to a Salesforce record:
// ParentId is the SObject of the record you're attaching a file to
// body truncated for brevity; replace with base64 of your file
Check whether they have access to Files.
1.From Setup, enter User Profiles in the Quick Find box, and select Profiles.
2.Click Edit next to the user profile you want to change.
3.In the Administrative Permissions section, enable or disable Select Files from Salesforce checkbox, and click Save.