#404 error for HTTP function

19 messages · Page 1 of 1 (latest)

empty gazelle
#

Hi wix team,
I followed this article https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/code-in-blocks/expose-a-blocks-app-api-with-http-functions to expose a backend api.
I created a method called getappdata.
But get call to exposed api https://www.dev-site-1x20-2.wix-dev-sites.org/_functions/@apps-jar/profy-countdown-dev/getappdata?instance=8c924576-0af2-4aa9-8ede-b79c0f2f818b is returning 404 not found.
The format matches what is present in the docs, can anyone help me.

Thanks

brittle condor
#

Did you try instead of writing "_functions" to use "_functions-dev" ?

empty gazelle
#

@brittle condor Yes i tried that also, same issue

#

Let me know if you need more details, I can share ir

brittle condor
#

yes, please share the appID

empty gazelle
#

Sure

#

I will DM you

brittle condor
#

Hi @empty gazelle . According to them, use this docs instead - https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/integrations/exposing-services/site-api-calls

  1. you need to export exact pattern get_appdataand not getappdata
  2. then need -backend part in the url

example of correct dev url https://petrk2.wixstudio.com/my-site-439/_functions-dev/@badass/testexportedfuntctions-backend/multiply?leftOperand=3&rightOperand=4

empty gazelle
#

@brittle condor Thanks will try

empty gazelle
#

@brittle condor Still having issue. I have updated the method name in blocks to get_appdata still facing issue

#

I am trying to hit this api

#

I have added both -backend part in the url and change method name to add get as per you instruction

brittle condor
#

@empty gazelle I’ve marked it as solved, since we discussed it in private 🙂

fathom condor
#

Hello team,

I'm currently trying to use HTTP functions in Velo by Wix. I tested the function within Wix and it worked fine, but when I tried calling it from Postman, I received a 403 error. Could you please help me check this?

Do I need to include any key when calling it from Postman? I couldn’t find any mention of such a key in the documentation.

empty gazelle
#

@fathom condor I was trying to hit api for custom app not sure about format velo function, maybe wix team can help you.