Skip to content

v2.2.4

Choose a tag to compare

@romanzipp romanzipp released this 30 Apr 07:34
· 256 commits to master since this release

Add support for OAuth Client Credentials Flow

- public function getOAuthToken(string $code): Result
+ public function getOAuthToken(?string $code = null, string $grantType = GrantType::AUTHORIZATION_CODE, array $scopes = []): Result
use romanzipp\Twitch\Enums\GrantType;

$twitch = new romanzipp\Twitch;

$twitch->getOAuthToken(null, GrantType::CLIENT_CREDENTIALS, ['user:read']);