Upstox Webhook API Not working

I tried to place order using upstox api and also during app creation i have given the postback url now when i try to place a order post market hour(for testing purpose)
i can see the order gets rejected due to post market but i didnt get any webhook hit regarding the rejection.

Thank you for getting in touch.

Could you kindly provide your User ID, order number, or order specifics? We will review this information and respond accordingly.

User ID : 558473
Order ID: 231004000847609
It’s a F&O order

@BENSON_XAVIER

Request you place another order. We’d want some more data to check this through.

Thanks!!!

@shanmu @Pradeep_Jaiswar
Today I placed the order during the market hour and it got placed but still no webhook got triggered
Order ID:231005000151954

@BENSON_XAVIER

It appears you have two apps: one with a postback endpoint and the other lacking one. The orders you made today utilized the apiKey that isn’t associated with a postback URL.

Please rectify this and try again.

Thank you!

@shanmu @Pradeep_Jaiswar
I am using proper API key however when I delete the other app and used the the same proper API key to get code for generating token I am getting the below issue but this same key worked previously and this is the proper app key

{“status”:“error”,“errors”:[{“errorCode”:“UDAPI100016”,“message”:“Invalid Credentials”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI100016”,“property_path”:null,“invalid_value”:null

My bad i was giving the proper api key while getting authorization code but while getting the authorization token using code i was giving the improper key
now after fixing this its working fine

thanks @shanmu

@BENSON_XAVIER that’s a relief I believe.

Happy coding!!

@BENSON_XAVIER could you help me with some details regarding webhook. I couldn’t make it working. My email : vinobabu.t@gmail.com

@BENSON_XAVIER Can you send me your postback URL code, i have tried with different different method its not working for me.
My code-

[HttpPost]
[Route(“PostbackUrl”, Name = “PostbackUrl”)]
O references
public async Task PostbackUrl()
string webRootPath = _webHostEnvironment.WebRootPath; var filepath = webRootPath + “\UpstoxLogs.txt”;
try
{
using (StreamWriter writer = new StreamWriter(filepath))
{
}
writer.WriteLine("Upstox api called ");
using (var reader = new StreamReader(Request.Body))
{
var body = await reader.ReadToEndAsync();
using (StreamWriter writer = new StreamWriter(filepath))
{
}
writer.WriteLine("Upstox data " + body);