mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Hello Im looking for a script that will invite users to a twitch chat group room if they type !inviteme in chat.

This is the api link I found

http://chatdepot.twitch.tv/room_memberships?irc_channel=**CHANNEL_NAME**&username=**USERNAME_TO_INVITE**&oauth_token=**CHAT_LOGIN_OAUTH_TOKEN**64

It just have to replace username to invite and open that up but how do I do it? I cant code and if someone could write this script it would be great!

Here is some documents about it https://blog.bashtech.net/chatdepot-api-for-twitch-group-chat/

Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Hello im back again now I have learned how to follow a channel using json

Code:
alias followchan {
  var %json followput
  JSONOpen -duw %json https://api.twitch.tv/kraken/users/ $+ $lower($me) $+ /follows/channels/ $+ $lower($1)
  JSONUrlMethod %json PUT
  JSONUrlHeader %json Connection close
  JSONUrlHeader %json Accept application/vnd.twitchtv.v3+json
  JSONUrlHeader %json Authorization OAuth oauth
  JSONUrlGet %json
}


This works but I want to use the same code to invite users to my group chat using the api above so I have tried this code,

Code:
alias inviteuser {
  var %json invitepost
  JSONOpen -duw %json JSONOpen -duw %json https://chatdepot.twitch.tv/room_memberships?irc_channel=_Random__Channel_123456789&username= $+ $lower($1)
  JSONUrlMethod %json POST
  JSONUrlHeader %json Connection close
  JSONUrlHeader %json Accept application/vnd.twitchtv.v3+json
  JSONUrlHeader %json Authorization OAuth oauth
  JSONUrlGet %json
}


But that does not work, I have the required all the scopes in my oauth so that should not be a problem.

Is there something im missing out on?

Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Any help on this?


Link Copied to Clipboard