Invalid client secret

It’s me again.
I’am using Delphi to retrieve the OAuth token
function HttpsPost(var RecvText : String) : Integer;
var
c : THTTPClient;
r : IHTTPResponse;
sl : TStrings;
t : string;
begin
sl := TStringList.Create;
sl.Add(‘client_id=’ + TWITCH_CLIENT_ID);
sl.Add(‘client_secret=’ + TWITCH_CLIENT_SECRET);
sl.Add(‘grant_type=client_credentials’);
t := ‘https://id.twitch.tv/oauth2/token’;
c := THTTPClient.Create;
r := c.Post(t, sl, nil, nil, nil);
Result := r.StatusCode;
// if Result = 200 then
RecvText := r.ContentAsString;
sl.Free;
c.Free;
end;

but i getting an error:

{“status”:403,“message”:“invalid client secret”}

what’s wrong?

Sorry. I have copypasted wrong ID.
All is fine.

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