PHP Google Contact API generateing HTTP/1.0 401 Authorization required
Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers , Stack Overflow Public questions & answers ,Thanks for contributing an answer to Stack Overflow!,I am using Google Contact API V3 with OAuth 2.0 to retrieve the contacts from Google Account, I am getting a OAuth Token from a child window using jQuery, and after post that token to another file which should get the User's Contacts, but when I pass the token to get the contacts from Google, but it gives an error "Warning: file_get_contents(https://www.google.com/m8/feeds/contacts/default/full&oauth_token=[token]) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization required in ...\getContacts.php on line 7"
Make sure that in your php.ini you have this lines:
extension = php_openssl.dll allow_url_fopen = On
Since the 401 Unauthorized Error is a client error response code, it’s best to start by troubleshooting any potential client-side issues that could be causing this error. Here are a handful of tips to try on the browser or device that is giving you problems.,The client is banned for some reason. Some applications use 401 Unauthorized Errors to restrict access requests from specific IP addresses, so if authentication is not the issue, a server-side ban could be the problem.,The client sent its authentication credentials to the server, but the server has rejected the credentials for some reason.,As with cookies, clearing the cache is browser-dependant, so here are a few links to that relevant documentation for the most popular browsers:
I'm using my email address as the username in Basic Auth, and using the API token as the password. Postman is correctly generating a base64 encoded Authorization header with the value 'Basic <base64 encoded string>'.,I also faced the same issue, instead of putting your password, please create API token and put into the password. That works for me.,How to use Token in Java Rest client. I am using it simply passing as username/password for atlassian account. Should I pass it as a request parameter.,This was the same for me. I have a SSO with company managed account using a new email and always got 401 with my API token.
I'm hitting this problem too, while trying to use the Cloud REST API:
<html> <head> <title>Unauthorized (401)</title>...trimmed... <div class="aui-message aui-message-warning warning"> <p>Encountered a <code>"401 - Unauthorized"</code> error while loading this page. </p> <p> <a href="/secure/MyJiraHome.jspa">Go to Jira home</a> </p> </div> </section> <!-- .aui-page-panel-content --> </div> <!-- .aui-page-panel-inner --> </div> <!-- .aui-page-panel --> </body> </html>
Other "contact-google" queries related to "PHP Google Contact API generateing HTTP/1.0 401 Authorization required"
- Convert php session to react
- Why couldn't nodejs instance start successfully in google app engine standard environment?
- How to use google tag manager and google ads in React-Router
- Getting a “404 Not Found” when I attempt to “Run Debug Application” of React app in PhpStorm
- React.js Google analytics not working. no realtime data is shown
- Module not found: Can't resolve 'react-google-charts/dist/types'
- Is there any way to get the location name from the longitude and latitude positions in react js google map
- Questions about php and react.js (please help im very lost)
- How to redirect an user to a specific webpage after Google Sign In with Redirect in Firebase?
- Can you display different components on different zoom levels with react-google-maps and have smooth transitions when zooming?
- Add Google Speech with Django websocket and React
- I have a simple react contact me form, the email it is supposed to send from nodemailer is coming in empty
- Google Cloud Bucket and ReactJS app Access
- DEVELOPER_ERROR error code 10 - Firebase google login in react native
- How to verify the token and get score using react-google-recaptcha-v3?
- Google Drive API Picker acting weird
- Google Analytics 4 with React
- Google oAUTH2 id_token expired
- Difference between google-map-react and google-maps-react?
- How to make sure Google logout button is available for entire app
- Contact form using nodemailer is not working
- React-google-maps change marker icon to waypoints
- Custom Marker as a React Component with react-google-maps-api
- Google Tag manager, Facebook Pixel pagespeed issue
- How to implement Google Maps JS API in React without an external library?
- Executing multiple cURL requests
- Magento 2 on docker - no css loaded
- Get the $request object in Laravel's model events (ex. created, updated etc.)
- PHP Shorthand if/else if - Basic
- How do I get the filename of an input file and display it again on button click without uploading it?
- How do I effectively use crypt()
- PHP Compare two dates in format 2011-05-16T09:39:14+0000 (facebook datetime format)
- AJAX and how to best deal with it server side in PHP
- Dynamic email in CF7 (using custom fields)
- Best way to store html template (Laravel 5)
- Usort array by two parameters using spaceship operator [duplicate]
- Displaying the data from database without reloading
- Cannot use php String variable in place of html plaintext
- There was an error trying to send your message. Please try again later. Wordpress
- Laravel using variable from database in custom blade directive
- SlimPHP Route not being called
- Problems with array when getting data from a database
- What exactly laravel's isValid method does?
- How to get width and height of mp4 file in php code before playing them [duplicate]