0

how can I start receiving and parsing callback api's responds in further with Django server?

I wanna setup my DRF server to start working with JIRA webhooks, but also it might be useful for other apis such as telegram and etc. In this case I need to provide them my server's url where I would expect new events/data, but atm I don't realise what it means exactly. Where do I need to start digging in?

Chickenfresh
  • 365
  • 5
  • 15

1 Answers1

1

Not sure about the apis you are talking about but if the api sends some callbacks you'll give them a url, mysite.com/whatever

make your url config like normal and in your view you can parse the result

def my_callback_view(request):
  # assuming it's a POST request 
  data = request.POST
  ... do whatever with the data
Reed Jones
  • 1,367
  • 15
  • 26
  • but to receive callbacks I need to deploy it on some server so my url would become reachable? – Chickenfresh Jul 19 '18 at 23:17
  • yeah. for development could use dummy data in the format you expect until your site is online. Or have it on a heroku app or something if you need – Reed Jones Jul 19 '18 at 23:23