@Pyhon3x

Почему redirect_uri_mismatch?

Привет,
У меня есть код
<?php
  $params = array(
  'client_id'     => '782016323201-ktsn3pteacteii6958sr2u0f13fj4441.apps.googleusercontent.com',
  'redirect_uri'  => 'https://test-server.tsecret.net/AUTH-2/WithGoogle.php',
  'response_type' => 'code',
  'scope'         => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
  'state'         => '001'
  );

  $url = 'http://accounts.google.com/o/oauth2/auth?' . urldecode(http_build_query($params));
  header('Location: '.$url.'');
?>

Почему когда он ссылается на адрес https://test-server.tsecret.net/AUTH-2/WithGoogle.php google дает ошибку redirect_uri_mismatch, да в Google API Console я этот адрес добавил.
Как исправить?
  • Вопрос задан
  • 54 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы