Using streamtip AUTH APi with mIRC?


#1

Is it at all possible to use streamtip AUTH APi with mIRC to get when a new donation is received? My main intent is just to have mIRC print out “Thanks for donating -user-!”.

I’m currently using “JSON for mIRC”. I was able to fetch the public api json.

[quote]alias currgoal {
var %u = https://streamtip.com/api/public/twitch/user/goal
var %v = twc_ $+ $ticks
JSONOpen -ud %v %u
;; Returns server code. 200 = good. Anything else bad
var %status = $JSON(%v,status)
;; Title of goal
var %title = $JSON(%v,goal,title)
;; Total amount of goal
var %totalamount = $JSON(%v,goal,amount)
;; The actual progress of the goal
var %progressamount = $JSON(%v,goal,progress,amount)
;; Currency symbol $ ¥ £
var %currsym = $JSON(%v,goal,progress,currencySymbol)
;; The amount of tips contributed to amount
var %currtips = $JSON(%v,goal,progress,tips)
;; The % percentage breakdown of the donation goal
var %currpercen = $JSON(%v,goal,progress,percentage)
;;
;;
;;
msg $chan /me %title
msg $chan /me %progressamount of %totalamount with %currtips tips.
msg $chan /me https://streamtip.com/t/user
:end
JSONClose %v
}[/quote]


#2

Please refer to the “Personal Client ID and Access Token” section of the documentation on handling authentication: https://streamtip.com/api


#3

Ok. I was able to get a little further. Im getting an “invalid client” error. Must be something with my client id.


#4

If you refer to the section I specifically stated, it shows you what to append onto the url and it shows you where to get the information you need to fill in:

Personal Client ID and Access Token

You can find your personal client ID and access token in the account area.

via header:

Authorization: client_id access_token

via query string:

/api/endpoint?client_id=client_id&access_token=access_token


#5

Ok thanks. I finally got it to work.


#6

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