Вот фрагмент кода:
$http = new GuzzleHttp\Client;
$response = $http->post('https://anilist.co/api/v2/oauth/token', [
"form_params" => [
"grant_type" => "authorization_code",
"client_id" => "1400",
"client_secret" => "2fIcQ0M3iHgrh63B09oh8z521bnGpjkw3LxvAKeh",
"redirect_uri" => "https://example.com/",
"code" => $code
],
"headers" => [
"Content-Type": "application/json",
"Accept": "application/json"
]
]);
return json_decode($response->getBody())->access_token;
Ошибка Parse error: syntax error, unexpected ':', expecting ']'