Emails with '+' in them are truncated in response from Get a batch of contacts by email address in Contacts API


#1

When using the' get a batch of contacts by email address' endpoint if emails contained in the response have a '+' in them the email gets truncated in the response.

For example if one of the emails I want contact info for is 'john.doe+test@gmail.com' the email that is returned for John doe in the response is 'test@gmail.com' instead of john.doe+test@gmail.com

Is there another way I can get this contacts full email back in the response form this endpoint? Or is this something that needs to be fixed in Hubspot's api?


#3

Hi @Kyle_Magnuson,

Can you confirm you're encoding + signs as %2B in your queries?

I was able to successfully pull data for contacts with + in their email address by doing so:

If you don't encode the + signs, HubSpot will search for emails which match the values that follow the sign. In your case, I suspect you have two contacts in your portal. One with john.doe+test@gmail.com and another with just test@gmail.com.


#4

Hi, thanks @Isaac_Takushi, encoding the + signs correctly was the issue.