I need to get the authorization code from the oauth, after i get the token from google, but i get the following error message:
Documentaton:
example project is attached. Thanks
B4X:
ResponseError. Reason: , Response: {"error":"unsupported_grant_type"}
Documentaton:
Build a Supabase Integration (Beta) | Supabase Docs
Build a Supabase Integration using OAuth2 and the Management API.
supabase.com
B4X:
Private Sub GetTokenFromAuthorizationCode (Code As String)
Log("Getting access token from authorization code...")
Dim j As HttpJob
j.Initialize("", Me)
Dim postString As String = $"code=${Code}&client_id=${mClientId}&grant_type=authorization_code&redirect_uri=${GetRedirectUri}"$
postString = AddClientSecret(postString)
j.PostString("https://xxx.supabase.co/auth/v1/token", postString)
j.GetRequest.SetHeader("Content-Type", "application/x-www-form-urlencoded")
j.GetRequest.SetHeader("apikey","your_supabase_apikey")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
TokenInformationFromResponse(j.GetString)
Else
ResetToken
RaiseEvent(False)
End If
j.Release
End Sub
example project is attached. Thanks