What is the problem in this code
LOG
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
{
"email": "[email protected]",
"password": "123456789",
"returnSecureToken": true
}
[email protected]
123456789
str:=
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: , Response: {
"error": {
"code": 400,
"message": "MISSING_EMAIL",
"errors": [
{
"message": "MISSING_EMAIL",
"domain": "global",
"reason": "invalid"
}
]
}
}
B4X:
Dim JSON As JSONGenerator
Dim m As Map = CreateMap("email":Email,"password":Password,"returnSecureToken":True)
JSON.Initialize(m)
Dim data As String = JSON.ToPrettyString(1)
Log(data)
Log(Email)
Log(Password)
job.Initialize("job",Me)
Dim link As String ="https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=XXXXXXXX-XXXXXXXXXXXXXXXXX"
str = job.PostString(link,data)
' job.GetRequest.SetContentType("application/json")
job.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0")
Log ("str:= " & str)
If issingUp Then
ToastMessageShow(str,True)
End If
LOG
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
{
"email": "[email protected]",
"password": "123456789",
"returnSecureToken": true
}
[email protected]
123456789
str:=
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ResponseError. Reason: , Response: {
"error": {
"code": 400,
"message": "MISSING_EMAIL",
"errors": [
{
"message": "MISSING_EMAIL",
"domain": "global",
"reason": "invalid"
}
]
}
}