How do I get user profile using Google Access Token

I had the same issue. I wanted to extract the user information. But couldn’t get the exact link to hit. Then I went through the code for Passport Google Strategy at Line number 54. My scopes were [‘profile’, ’email’] GET Request https://www.googleapis.com/oauth2/v3/userinfo?access_token={access_token} Response { “sub”: “23423….”, “name”: “John Doe”, “given_name”: “John”, “family_name”: “Doe”, “picture”: “<Profile … Read more

How to build html link to a google calendar event?

There is a way! To view a public calendar event, use a link of the form: https://www.google.com/calendar/event?eid={event-id}&ctz={timezone} where {event-id} is the unique event id, and {timezone} is one of these time zones. Here’s an example: link to a specific public calendar event. If you have editing rights to the calendar this event is from, you … Read more

Questions re: Gmail Sidebar Gadget Deprecation

Google usually perform spring-cleanings. Usually announces around march-april which features will be removed, and by july-august performs removal. However marking a feature as deprecated does not necesarilly mean immediate removal. Also, maybe this is related to Google G-suite marketplace: https://gsuite.google.com/marketplace/ BTW: in any situation, combine something that “is crucial to our operation” and something that … Read more

OAuth2.0 token strange behaviour (Invalid Credentials 401)

Per the Google API docs on errors & error codes: https://developers.google.com/drive/handle-errors#401_invalid_credentials 401: Invalid Credentials Invalid authorization header. The access token you’re using is either expired or invalid. error: { errors: [ { “domain”: “global”, “reason”: “authError”, “message”: “Invalid Credentials”, “locationType”: “header”, “location”: “Authorization”, } ], “code”: 401, “message”: “Invalid Credentials” } } This matches your … Read more

How do I add/create/insert files to Google Drive through the API?

The documentation on insert operations already contains examples in a bunch of programming languages, here is how to do it using the HTTP based protocol of the Google Drive API. First, POST the new file metadata to the Drive endpoint. It has to be in the form of a File resource JSON object: POST /drive/v2/files … Read more

Error: invalid_client no registered origin

In the new Google API Console, configure your OAuth2.0 authorized origins from Your Project > APIs & auth > Credentials You might need to add a new Client ID specifically for a web application (I did because the default was for AppEngine) Create Client ID > Web Application > Authorized Javascript origins If you are … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)