R
Railway2mo ago
sowing

Setting up custom webhooks

This is a bit more of a generic question, but I want to set up a custom webhook to hit my own server when it's deployed. The docs don't really have a ton of information about rolling your own webhook endpoints, is that not an intended use case? If that's not the case, is there somewhere I can find more information about the http requests that the webhooks send than what can be found at https://docs.railway.app/reference/webhooks and https://docs.railway.app/guides/webhooks ?
Railway Docs
Webhooks | Railway Docs
Documentation for Railway
Railway Docs
Setup Webhooks | Railway Docs
Documentation for Railway
Solution:
hacky would be having railway call the service with a webhook
Jump to solution
8 Replies
Percy
Percy2mo ago
Project ID: N/A
sowing
sowingOP2mo ago
N/A
Brody
Brody2mo ago
first can you explain your usecase?
sowing
sowingOP2mo ago
basically I want to give my server access to my spotify account when it restarts, so I want to hit an endpoint on the server when the deployment is complete that will generate a magic link and email it to me so that I can do the authorization manually. I really wish spotify had a way to do so programatically but it looks like their api is built more for getting end-user information so the only way to get an access key is to go through the OAuth flow manually
Brody
Brody2mo ago
why would that ever require hitting your service with a webhook?
sowing
sowingOP2mo ago
would it make more sense to just do it on startup? I thought about that but I felt like it was too hacky but maybe that's the more sensible way to do it
Solution
Brody
Brody2mo ago
hacky would be having railway call the service with a webhook
sowing
sowingOP2mo ago
cool
Want results from more Discord servers?
Add your server