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 global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...
- Appwrite Auth & Function don't reveal cl...
When I execute a function or sign in with my Flutter app, Appwrite does not show my real IP: instead, it seems that Appwrite shows Fastly CDN IP address.
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...