Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simple_app - localhost:5000 returns 404 {"detail":"Not Found"} #25

Open
kmocorro opened this issue Mar 2, 2022 · 6 comments
Open

simple_app - localhost:5000 returns 404 {"detail":"Not Found"} #25

kmocorro opened this issue Mar 2, 2022 · 6 comments

Comments

@kmocorro
Copy link

kmocorro commented Mar 2, 2022

Hi Saleor Team,

I managed to add appUrl in the manifest so python3 -m simple_app would work. The problem next is the server returns 404. Anything I could have missed? Thanks!

image

@peteror
Copy link

peteror commented Mar 3, 2022

Hi,
I just started with this one yesterday, the endpoint you are looking for is at localhost:5000/webhook

@kmocorro
Copy link
Author

kmocorro commented Mar 3, 2022

Hello @peteror ,

Somehow, it returns method not allowed.
image

@peteror
Copy link

peteror commented Mar 3, 2022

this framework sets the /webhook endpoint for receiving Saleor callbacks, which are POST messages. If you just use it from a browser, it will send GET, which is not defined, thus you get this message.

@kmocorro
Copy link
Author

kmocorro commented Mar 3, 2022

Yea, I did POST request using postman. I got different response.. Now, I have to look for the header x-saleor-event which in case, I don't know yet what's the value.

@peteror
Copy link

peteror commented Mar 3, 2022

The x-saleor-event is one of the events you see here: https://docs.saleor.io/docs/3.0/developer/api-reference/enums/webhook-sample-event-type-enum/.
Then you'll also need x-saleor-domain (which is where your Saleor API is)
then you'll need x-saleor-signature which is calculated by Saleor: you can either try to hack this framework and remove this validation or just use a local Saleor instance to test it with.

@peteror
Copy link

peteror commented Mar 3, 2022

one more thing: if you run Saleor-platform (or Saleor in any other way) locally in Docker, use this as the webhook target (assuming this Python app also runs on your machine):
host.docker.internal:port
(where the port you run this Python app on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants