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
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...
- My cloud functions failing 3 days ago (P...
Hi, My cloud function using python has been failing for 3 days, I didn't push any new deployments... Its something to do with it not recognising the entrypoi...
- Scheduled works locking the entire Maria...
I have a scheduled function and apparently that or something is locking the entire MariaDB database and Appwrite is giving MariaDB errors. This error persists e...