I'm hoping to use appwrite function as handler for inbound webhook from xero. Can't add custom authentication to xero webhook (i.e. can't configure to include x-appwrite-project).
So, I can create function execution via rest api fine with x-appwrite-project header, but if I try to use the project query param I'm getting Function with the requested ID could not be found.
Is it possible to execute a function without appwrite headers?
Maybe this will help: https://appwrite.io/docs/rest#no-headers
yep, I was going off that example. so trying something like this is what's returning the error above
https://[MY_APPWRITE_URL]/v1/functions/[FUNCTION_ID]/executions?project=[MY_PROJECT_ID]
You sure the project is correct? And request method is post? And permissions are set to any?
yep. project id in url is the same as project id in header (in postman) if I toggle the x-appwrite-project header on, I can create function execution, if I toggle off (with project id as query param) then it fails with Function with the requested ID could not be found.
How about if you include it in the request body?
yep, that works
but same issue as with headers re xero webhook...
Honestly, functions don't work so well as a web hook right now. It will in a future release 😁
For now, you might need a proxy in front of Appwrite
ahh, cool. thanks @Steven
yep, I was hoping to avoid that, but need it for another reason anyway - i.e. parsing and transforming the resposne structure from function execution to conform with openapi spec...
Hey @arpentnoir - shall I close this post if your doubt is resolved?
yes, thanks
[SOLVED] execute a function via rest api without headers?
Recommended threads
- Python TablesDB Rework
Hi, i starting to rework some older functions to TablesDB list_rows Method. I used list_documents with a resultset with worked fine. Now i tried to get all rows...
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast