I am having trouble identifying the documentation for authenticating the Google Drive API. I have the Client ID and Client Secret already, but don't know the current Curl format for getting the Code and Access Token. Anyone have a documentation link for where to get Google API Authentication URLs?
Related
I am trying to understand how google OAuth works. I have implemented this oauth tutorial from spring docs. Below is the screen shot of network traffic occurred when I selected my account from the list of accounts shown by the google.
Resource 1
Resource 2
Resource 3
I guess OAuth works on JWT, and once username and password is correct, it should return JWT. However, I am not able to find JWT returned by google in above network traffic. Am I understanding it wrong?
OAuth2 may use JWT but it is not a requirement even though I believe (not sure on that one) that it would be used between Spring-security and Google.
However the communication is between the server and Google so you would not get the token in the front-end. If you get a token in your front-end it would most probably one generated from your own back-end.
I am looking for tips or tutorial where I can fetch data from youtube data api.
By using only api key, I can use any rest api client in order to fetch many informations from https://www.googleapis.com/youtube/v3/channels.
And now, I would like to get auditDetails which needs authorization token https://developers.google.com/youtube/v3/docs/channels/list#auth.
[Edit]
By following the steps below (Using OAuth guides), I can now make request but I have an error 400 which is redirect_uri_mismatch:
The redirect URI in the request, http://localhost:9874, does not match the ones authorized for the OAuth client
In my console developer configuration, I set the redirect authorized url to http://localhost/authorize.php
So I do not understand why during the authentification, it uses http://localhost:9874
I'm using google oauthlib to get an access_token and use it to get gmail atom feed using requests because it is not supported by the python lib.
When using supported services such as drive, the token is automatically refreshed, how to do that in my case?
Assuming you have your refresh token you can use it to request a new Access token using HTTP POST
https://accounts.google.com/o/oauth2/token
client_id={ClientId}.apps.googleusercontent.com&client_secret={ClientSecret}&refresh_token=1/ffYmfI0sjR54Ft9oupubLzrJhD1hZS5tWQcyAvNECCA&grant_type=refresh_token
this Link may help Google 3 legged oauth2 flow
If i make a GET request to other api calls like "https://www.yammer.com/api/v1/messages.json", I get results back (this proves the office 365 bearer token i am using works).
If i make a request to Yammer /autocomplete/ranked using the following url:
https://www.yammer.com/api/v1/autocomplete/ranked?prefix=&models=group:10
or
https://api.yammer.com/api/v1/autocomplete/ranked?prefix=&models=group:10
This returns a 401:
Credentials are required to access this resource
Any ideas what might be wrong?
API: https://developer.yammer.com/docs/autocompleteranked
I'm terribly sorry, but at present, this particular endpoint does not support using an O365 bearer token.
We are adding support for O365 credentials to more and more of our endpoints, but in the meantime you can access all of our endpoints using a Yammer-only token, documentation for which can be found here: https://developer.yammer.com/docs/app-registration
Source: I'm an engineer at Yammer and I've worked on these features.
How do I obtain a Google OAUTH2 key using curl? In particular I'm interested in getting a key for blogger.com.
I can successfully retrieve data when logged into the Google API Explorer.
GET https://www.googleapis.com/blogger/v3/blogs/byurl?url=http%3A%2F%2Feastbay-rc.blogspot.com&key={YOUR_API_KEY}