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=${"xx"}&grant_type=authorization_code&redirect_uri=${GetRedirectUri}"$
postString = postString & "&client_secret=" & "xx"
j.PostString("https://api.supabase.com/v1/oauth/token", postString)
j.GetRequest.SetHeader("Content-Type", "application/x-www-form-urlencoded")
j.GetRequest.SetHeader("apikey","xxx")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
TokenInformationFromResponse(j.GetString)
Else
ResetToken
RaiseEvent(False)
End If
j.Release
End Sub