[Firebase] How to get "emailVerified" from response?

Do you think that, using json tools extension is simple?
I thought I could use some blocks, or maybie build a procedure to get a certain value from a tag!

Example: call procedure GetTagValue (string) (tag)
where (string) can be the Response of Web1

i cant help in this that much because i dont make app related to json so currently i dont have any idea how to use json tools but as i suggested if you only want to check email is verified or not then my solution will be also good and that is easy also to make.

I think you need to start at the basics. Here is how to parse JSON using the nested list structure they are built with.

JSON and list of lists: example1 and example2

Hi,
As i see the response, now the data structure is a list of users and each user has a tag called emailVerified so if you want to get the emailVerified you need to use 2 look up in pairs key block. I will show you the blocks in a bit

Example of a response:

{
“kind”: “identitytoolkit#VerifyAssertionResponse”,
“federatedId”: “https://accounts.google.com/1234567890”,
“providerId”: “google.com”,
“localId”: “5xwsPCWYo…”,
“emailVerified”: true,
“email”: "[email protected]",
“oauthIdToken”: “[GOOGLE_ID_TOKEN]”,
“firstName”: “John”,
“lastName”: “Doe”,
“fullName”: “John Doe”,
“displayName”: “John Doe”,
“idToken”: “[ID_TOKEN]”,
“photoUrl”: “https://lh5.googleusercontent.com/.../photo.jpg”,
“refreshToken”: “[REFRESH_TOKEN]”,
“expiresIn”: “3600”,
“rawUserInfo”: “{“updated_time”:“2017-02-22T01:10:57+0000”,“gender”:“male”, …}”
}

It was good to have a function (procedure) with a “string” and a “tag” inputs, and then call that the funtion. I did this, but ins’t working:
02

Can someone help please? Ty

This can Help you. Try these Blocks :

The Index can be changed To get if the email is verified for other users as well

I tried this:

Runtime Error
The operation lookup in pairs cannot accept the arguments: , [users], [{ “kind”: “identitytoolkit#GetAccountInfoResponse”, “users”: [ { “localId”: “PNhYSwixwZT1xlC2gC2uiX7nf9r2”, “email”: "[email protected]", “passwordHash”: “UkxEQUNUxUQ=”, “emailVerified”: false, “passwordUpdatedAt”: 1555144506952, “providerUserInfo”: [ { “providerId”: “password”, “federatedId”: "[email protected]", “email”: "[email protected]", “rawId”: "[email protected]" } ], “validSince”: “1555144506”, “lastLoginAt”: “1555344516952”, “createdAt”: “1525344506952” } ] } ], [not found]

You have to decode the JSON first

Yea Right, Sorry I forgot to show that in the blocks. Extremely Sorry @SVasco. Thanks for pointing it out @cian

1 Like

Got it!

Thank you so much for your help guys :+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

I have done as you guys suggested in post but still I am not getting response. Please help me to bulid my app
https://community.kodular.io/t/firebase-how-to-get-emailverified-from-response/23575?u=aviral_r

These are my blocks

Don’t use usernames in a post to get attention. I removed them.

Sorry this chat was closed so I have tag them, from next time I will keep this in mind

Can you post your response here?

When I am trying to verify then I am not geting any response

Did you call the Url in a web browser first and test it? Also i see a space after you type key=

Thank you for pointing out that but I rectified it eariler, I tried call the URL in Web Browser.

After making some changes I am getting response in the application too but now have another problem

I have attached the Runtime error screenshot and the block diagram in the picture below. Please check if I am missing or misplacing blocks in this.

Thank You

Can you post your responseContent here without the lookup in pairs blocks