Search code examples
google-people-api

google people api search by phonenumbers


I'm trying to use "searchContacts" method of the Google People Apis to search contacts by phone number but the result is always empty.

If I set the name of one of my contacts in query paramters, It works fine. If I set the phone number in the query parameter, no result is returned to me.

I also trying to use "The test panel" in the Google documentation page (https://developers.google.com/people/api/rest/v1/people/searchContacts) but I have the same end.

Is this possibile? If yes, How should I set the query parameter?

thank you


Solution

  • Use the canonicalForm of the phoneNumber without the + sign.

    Example:

    enter image description here

    Request parameter:

    enter image description here

    Output:

    enter image description here