Post Raid vs Postman Post Raid


I’m trying to call the Post Raid endpoint with my Postman it works fine. But with my code it doesn’t work. I don’t get an exception and also not error it just stops with code 0. At the PostAsync line.
I’m not sure what i do wrong the oauth2.0 is with the channel:manage:raids scope. Does Postman do something else that my C# code. Do i need to do something with the Raid Channel Event?

 string url = "";
 HttpClient client = new();

 client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
 client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", setting.oauth);
 client.DefaultRequestHeaders.Add("Client-Id", setting.ClientID);

 HttpResponseMessage res = await client.PostAsync(url, null);

Error code 0 is usually indicative of a issue with the system.
And not the API, as your system failed to even make the call to the API.

Could be a SSL negoatiation issue.
Could be a firewall issue
Could be something else.

If you can enable some sort of Verbose or full logging of the HttpClient client that might provide additional information. But the issue lies with the system and potentially the packages installed to the system

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.