/** * Return a Twitch authentication URL. * * @param string $client * @param string $redirect * @param string $scopes * @return string */ public static function url($client = null, $redirect = null, $scopes = null) { return sprintf("%s/oauth2/authorize?%s", Application::api(), http_build_query(['response_type' => 'code', 'client_id' => $client ?: Application::client(), 'redirect_uri' => $redirect ?: Application::redirect(), 'scope' => $scopes ?: Application::scopes()])); }