How do I use the new Twitch API with PHP?

Br
- in Twitch
5

https://dev.twitch.tv/docs/api/reference#get-users

How do I use PHP? With the old API I did it like this:

$ json1 = json_decode (file_get_contents ('https://api.twitch.tv/kraken/channels/'. $ nickname. '? Client_id = XXXXX'));

Fe

As before, you will send out a URL that will be assembled as described in the documentation. There may also be new ways to authenticate with the API, but this can be read in https://dev.twitch.tv/docs/authentication.

Br

Example code?

De

Go to the link and read a bit. There are also examples, even in PHP

Br

There's nothing with php

De

The introduction also contains the sentence "Code samples are available https://github.com/twitchdev/authentication-samples."

If one follows the link one arrives at GitHub where all examples are summarized. There's a list of all programming languages in which there are examples. The first of these is PHP