Google Calendar Error Redirecting
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
från GoogleLogga inDolda fältSök efter grupper eller meddelanden
here for a quick overview of the site Help Center Detailed answers to http://stackoverflow.com/questions/35957500/google-calendar-api-error-redirect-uri-mismatch any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more https://www.netdiggers.com/fix-this-webpage-has-a-redirect-loop-error/ about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack google calendar Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Google Calendar API error redirect_uri_mismatch up vote 0 down vote favorite I am trying to use the google API to manage the user´s calendar, and I am finding google calendar error a problem. I created and configured a google project on the Google Developers Console. One of the settings was the allowed redirecting uris... and I think it is ok, because after some test where google threw the same error (redirect_uri_mismatch), I got that google ask me for permissions... the problem I think is this line: $this->client->authenticate($_GET['code']); I am going to show the code and explain what it does function __construct() { parent::__construct(); require __DIR__ . '/vendor/autoload.php'; define('APPLICATION_NAME', 'Google Calendar API PHP Quickstart'); define('CLIENT_SECRET_PATH', __DIR__ . '/credentials/client_secret.json'); define('CREDENTIALS_PATH', __DIR__ .'/credentials/'); define('SCOPES', implode(' ', array(Google_Service_Calendar::CALENDAR_READONLY))); // If modifying these scopes, delete your previously saved credentials // at ~/.credentials/calendar-php-quickstart.json $this->client = new Google_Client(); $this->client->setApplicationName(APPLICATION_NAME); $this->client->setScopes(SCOPES); $this->client->setAuthConfigFile(CLIENT_SECRET_PATH); if (!file_exists(CLIENT_SECRET_PATH.$this->session->userdata("identity").".json") && !$this->input->get("code")) $this->getCredentials(); } public function responseCredentials() { $authCode = $this->input->get("code"); $this->client->authenticate($_GET['code']); $accessToken = $this->client->client->getAccessToken(); $credentialsPath = CLIENT_SECRET_PATH.$this->session->userdata("identity").".json"; mkdir(dirname($credentialsPath), 0700, true); file_put_contents($credentialsPath, $accessToken); redirect(base_url("dashboard")); } private function getCredentials() { $this->client->setRedirectUri(base_url('calendar/responseCredentials')); $authUrl = $this->client->createAuthUrl(); header('Location: ' . filter_var($authUrl, FILTER_SANITIZE_U
Google Chrome, you might have noticed a frustrating error - This webpage has a redirect loop , aka Error 310(net::ERR_TOO_MANY_REDIRECTS): There were too many redirects. Similar is the YouTube loop chrome while trying to access YouTube and google calendar redirect loop when trying to access google calendar. The error usually gets resolved by clearing cookies or by allowing third party cookies, provided that the issue is not from the server side. If the issue is from the server side, the end user can only try accessing the website by deleting cookies and trying in a different web browser. Ways to fix this webpage has a redirect loop errorThe error is typically caused from the client side, or from the server side. So, the following are the different possible ways to fix this webpage has a redirect loop errorClient side (End User)If the issue is from the client side,the following are the different ways to fix "This webpage has a redirect loop" , aka Error 310(net::ERR_TOO_MANY_REDIRECTS): There were too many redirects:# Update date and timeThis is the first step that we would take while troubleshooting Error 310 (there were too many redirects).The following is how you can go ahead and change date/time:Right click on the taskbar, and click ‘Adjust date/time' as shown in the image belowClick ‘change date and time' and ‘change timezone'. If this doesn't help in fixing ‘this webpage has a redirect loop error', follow the next steps# Update chrome browserCheck if your chrome browser is updated. If it's not, please try updating the chrome browser# Remove addonsChrome extensions certainly help with added functinality. In the past we have written a good note on chrome extensions for webdesigners and developers. However; a huge number of them would really cost in errors like these. Hence it is advised to install what is required and remove the rest of extensions. If you've a good number of extensions, the following is the step by step process of removing a chrome extension which is of no use:Click on the hamburger chrome me