Twitch API v5 anyone have a clue?

Previous topic - Next topic

Schranz0r

Hi guys,

anyone have a clue how to get the access-token from the TwitchAPI v5?
This is the link: https://dev.twitch.tv/docs/v5/guides/authentication/

I have all things together to sent my stuff to Twitch, but HOW? :D

NETWEBGET is not working for me...
I don't know,is it possible with Sockets?

For the case i/we can send it to twitchAPI, we need the returned URL with the access-token in it.  :puke:

Connection to the TwitchIRC was easy, but this...
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

r0ber7

I would suggest reading up on OAuth 2 authentication. It's counterintuitive at first. There are many libraries in PHP that take care of this low-level problem. Of course, GLBasic, you would have to write your own.

On the other hand, it seems they explain right on the page you sent:

GET https://api.twitch.tv/kraken/oauth2/authorize
    ?client_id=<your client ID>
    &redirect_uri=<your registered redirect URI>
    &response_type=code
    &scope=<space-separated list of scopes>

WPShadow

The question is how to get the information with the GLBasic network commands... Is that possible?
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

spacefractal

property also require https. im not sure its works with https. Howover a php based might also works and communicate to that and let glbasic such a script.

On iOS im would property use xcode directly.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Schranz0r

One option is CURL, maybe i write a DLL-Wrapper for this one.
Any other opinions?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

r0ber7

I would set up a PHP relay. So I could use NETWEBGET on the PHP site, and it would use a PHP library which is made for the Twitch API, like this:

Code (glbasic) Select

        NETWEBGET("www.example.com", "/page.php?get_certificate=1", 80, "twitch_response.txt")



This is a universal PHP interface designed specifically to connect to and interact with the twitch.tv Kraken API servers. It was designed with the intention of being very controlled, safe and light for both the user server and the Kraken API servers. Almost, if not all capable calls are coded directly into the interface, allowing the interface to perform almost, if not all functions that the API allows. Any functions that you believe need to be added or improved can be done via a pull request or opening up an issue.

Currently this interface supports all V5 API calls.


https://github.com/IBurn36360/Twitch_Interface

The relay would cause an extra network latency, but it would save you from having to reinvent the wheel I think.