$params = array(
'client_id' => вставил id,
'client_secret' => 'вставил secret',
'code' => $request['code'],
'redirect_uri' => 'https://exampl.com/login-vk'
);
$token = json_decode(file_get_contents('https://oauth.vk.com/access_token' . '?' . urldecode(http_build_query($params))), true);