For some reason I’ve been unable to get this to work no matter what I do
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {BotDetails.USER_ACCESS_TOKEN}");
client.DefaultRequestHeaders.Add("Client-Id", BotDetails.CLIENT_ID);
var content = new StringContent(JsonSerializer.Serialize(new
{
type = "channel.chat.message",
version = "1",
condition = new
{
broadcaster_user_id = BotDetails.CHAT_CHANNEL_USER_ID,
user_id = BotDetails.BOT_USER_ID
},
transport = new
{
method = "websocket",
session_id = sessionId
}
}), Encoding.UTF8, "application/json");
I’ve tried everything… It seems like I’m meant to pass my APP_ACCESS_TOKEN right? but if I use that instead of the user one, I get a 400 “invalid transport and auth combination” error…
I’ve put my required scope as “user:bot”, “user:read:chat”, “user:write:chat”. When my bot starts it gives me a URL to auth, I click it and I grant the perms and yet I still have the 403 forbidden no matter what I do.
Both ID’s are numeric yeh but I’m not 100% sure if they are correct… I used a website where I put the usernames in to get ID’s
Edit: Sorry I missed the banned question. I swapped to my bot account and sent a message in the channel manually and it worked. So it shouldn’t be banned?
Edit 2: I figured out that I could get ID’s from that link you sent and yeh both are correct