What should I do for update new api?

My Old codes this:

string result;
using (HttpRequest httpRequest = new HttpRequest())
{
try
{
httpRequest.UserAgent = Http.RandomUserAgent();
httpRequest.Referer = “https://www.twitch.tv/”;
httpRequest.IgnoreProtocolErrors = true;
httpRequest.Reconnect = false;
httpRequest.Authorization = “OAuth " + token;
httpRequest.AddHeader(“Pragma”, “no-cache”);
httpRequest.AddHeader(“Origin”, “https://twitch.tv”);
httpRequest.AddHeader(“Client-Id”, “xxxxxxxxxxxxx”);
bool flag = this.follow;
string str;
if (flag)
{
str = “[{“operationName”:“name_FollowUser”,“variables”:{“input”:{“disableNotifications”:false,“targetID”:”” + this.followChannelId + “”}},“extensions”:{“persistedQuery”:{“version”:1,“sha256Hash”:“51956xxxxxxxxxxxxxxxxd4b62096a1ac03be9e6”}}}]";
}
else
{
str = “[{“operationName”:“name_UnfollowUser”,“variables”:{“input”:{“targetID”:”" + this.followChannelId + “”}},“extensions”:{“persistedQuery”:{“version”:1,“sha256Hash”:“d7fbdxxxxxxxxxxxxxxxxxxxxxxea1c52bb632d41”}}}]";
}
result = httpRequest.Post(“https://gql.twitch.tv/gql”, str, “text/plain;charset=UTF-8”).ToString();
}
catch (Exception)
{
result = “request error”;
}
}
return result;

What is the new api codes? Somebody help me please. Best,

You are calling GQL.

GQL is not a supported API endpoint

You seem to be trying to follow or unfollow a user

Covers the Helix/supported API calls

Hey Barry.
I hope you be good.
What should I do for work my codes Barry?
Thanks for supporting me. I will waiting your reply

I have already provided the reference documentation for the follow and unfollow endpoints. Not sure what you want

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