B4A Class [class][B4X] Google OAuth2 - Erel    
Oct 29, 2025   
(44 reactions)   
tags: wait, Google such a way that the browser will redirect the response back to our app.
GoogleOAuth2 class takes care.../identity/protocols/OAuth2InstalledApp
Setup
1. Go to Google developer console, create a new project...
link: Edit: The Android implementation will not work with Google services due to new restrictions. Use...
link: - v2.11: added "access_type":"offline" to the token request. This is a new requi...
link: - B4XPages project is attached to first post. Don't miss:
Different ClientId for each platform
...
B4J Code Snippet Google OAuth2 authorization token - Erel    
Dec 3, 2020   
(11 reactions)Some of Google online services no longer allow the access token to be sent as a query parameter.
You will get an error similar to:
"The OAuth token was received in the query string, which this API forbids for response formats other than JSON or XML. If possible, try sending the OAuth token in the Authorization header instead."
The solution is to send it in the authorization header...:
'this code is from the tool that downloads the Google Sheet translation table and prepares it for...
B4J Question [SOLVED] Google Oauth2 And Refresh Token - Star-Dust    
Mar 14, 2024When I ask for the token following Erel's example (here) it works correctly and tells me that th...
link: ("https://accounts.google.com/o/oauth2/v2/auth", _
CreateMap("client_id"...
link:
Resolved.
can you please post the changes you made to the OAuth-Class?...
link: .google.com/identity/protocols/oauth2/web-server?hl=en#httprest_1
You´ll only get a Refreshtoken in...
B4A Question Is working Google Oauth2 sample as it? - josejad    
Oct 25, 2025Hi:
Can someone runs the Google Oauth2 sample, to test it?
I've downloaded and follow the instructions:
- Register in google console my app for example as: com.sample.google. Set this package...
link: Looks like the current implementation is no longer supported. I will update it based on Google...
link: Please, if you can refresh your credentials in Google and gl try it.......
link: it's been a while since I used it, but it did work... less than a year ago...
Bug? GoogleOAuth-Class - Support access_type=offline - DonManfred    
Mar 19, 2024   
(3 reactions)Here i posted a comment in a problem-thread.
https://www.b4x.com/android/forum/threads/solved-google-oauth2-and-refresh-token.159898/post-982109
The solution is to add "access_type":"offline" to the Authenticaterequest.
You get no RefreshToken with new projects. They use...
link: Fixed. Thank you....
link: https://www.b4x.com/android/forum/attachments/snap1-png.151911/...
B4A Question [SOLVED] [B4X] Google OAuth2, how to get and apply the profile photo - Cableguy    
Aug 5, 2024Hi guys,
I'm trying to get the avatar or profile photo, whatever you want to call it, using the OAuth2 class, but Not getting very far...
here's what I've tried, no luck.:
Dim avatar As Map = map.Get("cover_photos")
If avatar.IsInitialized Then
Dim my_avatar As Bitmap = avatar.Get(0)
my_avatar.Initialize2(avatar.Get("value"...
link: , here you have, how to retrieve the profile photo using OAuth2...
B4A Question Google oAuth2 - Access Blocked, the request is invalid - aaronk    
Dec 11, 2023Hi,
I am trying the Google oAuth2 for the first time.
I came across the following, and followed the steps from the link below:
https://www.b4x.com/android/forum/threads/class-b4x-google-oauth2... only changed the following:
Google Console
Created a new project. I called it 'PeopleAPITest...
link: .
In the Google Console, open the 'Credentials' section on the left side.
Under the 'OAuth...
link:
Custom URI scheme is not enabled for your Android client.
this is the error.
Have you added the manifestcode needed?
also you hav...
B4J Question GoogleOAuth NonUI app - aaronk    
Jul 23, 2017Hi,
I am using GoogleOAuth2 with my B4J app (Non-UI).
Since my app is an nonUI app it can't open the web browser and authorize the app,wWhen using:
Private Sub Authenticate
#if B4J
PrepareServer
#End If
Dim link As String = BuildLink("https://accounts.google.com/o/oauth2/v2/auth", _
CreateMap("client_id": mClientId, _
"redirect_uri"...
link: /android/forum/threads/google-play-developer-api.81839/)....
B4A Question Google OAuth2 - Error 400: redirect_uri_mismatch - JOTHA    
Jul 4, 2021Hello Forum,
I used the Example Google OAuth2 from Erel, but I get this Error 400... on this case.
I want to have access to Google Sheets, so I tried first the example with "Contacts"...
link: Are you using B4A-Bridge or USB debug mode? If you are able to use USB debug mode then try it, as it...
link: Hi Erel,
after you told me that I had obviously made a mistake, I went through everything again ste...
link: All that I can say is that you probably misconfigured something....
B4A Tutorial OAuth 2.0 / Google web services tutorial - Erel    
May 11, 2017   
(2 reactions)This tutorial is no longer relevant. Google doesn't allow using WebView to access the server response. Updated tutorial: https://www.b4x.com/android/forum/threads/class-b4x-google-oauth2.79426...
link: that the wv_PageFinished sub is looking for a return URL of "https://accounts.google.com/o/oauth2...
link: See this thread: https://www.b4x.com/android/forum/threads/on-april-20-2017-google-will-start...
link: Hello everyone
it seems that from April 20, are no longer allowed OAuth requests to Google in...
Page: 1  
2  
3  
4  
5