google / identity-toolkit-java-client

Google Identity Toolkit client library for Java
Apache License 2.0
37 stars 27 forks source link

GitkitServerException: org.json.JSONException: JSONObject["access_token"] not found. #45

Closed weikangchia closed 8 years ago

weikangchia commented 8 years ago

I am trying to get an email verification link for a particular email registered user via System.out.println(gitkitClient.getEmailVerificationLink(gitkitUser.getEmail()));. However, I am getting this exception: com.google.identitytoolkit.GitkitServerException: org.json.JSONException: JSONObject["access_token"] not found.

May I know what have I done wrong.

Thanks in advance.

weikangchia commented 8 years ago

My bad, it turns out that I have used an invalid ServiceAccountEmail. The correct form should be like this: service-name@project-name.xxx.xxxxxxxxx.xxx