Not enough permissions to add attachment to Invoice
Hey, I have been trying to automate some attachment processing and hit an unexpected permissions issue. My goal is to automate the upload of some files as attachments of Invoices. My steps were the following:
- Created a new self-client through the Developer Space UI
- Downloaded the self-client
- Got the Refresh token and first access token
- Sent a POST request to: https://books.zoho.com/api/v3/invoices/{INVOICE_ID}/attachment
POST req; Upload attachment
- POST /api/v3/invoices/INVOICE_ID/attachment?organization_id=ORG_ID HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Authorization: Bearer
{ACCESS_TOKEN}
Connection: keep-alive
Content-Length: 16045
Content-Type: multipart/form-data; boundary=697684a1c19f4bf4ada93be359205fb8
Host: books.zoho.com
User-Agent: HTTPie/3.2.1
+-----------------------------------------+
| NOTE: binary data not shown in terminal |
+-----------------------------------------+
With the following command:
And got:
- {
"code": 104003,
"message": "You don't have permission to perform this operation. Please contact your Administrator."
}
This is the scope I'm using for the self-client:
"scope": [
"ZohoBooks.invoices.CREATE",
"ZohoBooks.invoices.READ",
"ZohoBooks.invoices.UPDATE",
"ZohoBooks.invoices.DELETE"
],
(I concatenate all those values in a single line, separated by comma).
Notes:
- I can successfully send a READ (get) request to the same invoice_id
- The same behavior is observed in other Objects (can READ, cannot WRITE)
I'm guessing a box needs to be checked somewhere throughout the Admin Panel?
Bonus question: According to the docs (
here), one can only upload gif, png, jpeg, jpg, bmp and pdf files. Is there a reason for this? I would like to be able to upload xlsx files, as can be easily done through the UI.
Thank you :)
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.