Perusi
Perusi

Reputation: 9

Create a new Google contact using a url request?

Is there a simpler way to add new contacts through a URL request, something like this:

https://google.contacts.com/new_contact?App_Name=myapp&Id=myId&password=mypwd&name=newUserName&[email protected]...

I think this was asked some years ago... maybe someone found a way! Thanks

Upvotes: 0

Views: 1355

Answers (3)

Rachel
Rachel

Reputation: 1

This works for me, creating a url with the name, email and phone populated. I haven't figured out how to add a second phone or email yet, but I'm guessing it's probably phone2 and email2. One day I'll get around to testing it but I don't need it yet.

https://contacts.google.com/new?email=email&phone=phone&givenname=firstname&familyname=lastname

Upvotes: 0

hennekec
hennekec

Reputation: 172

I recently had the same need, came across this post, and then figured out a little bit through trial and error.

This URL works to take a person to a "new contact" page, with the email and phone pre-populated:

https://contacts.google.com/u/0/new?hl=en&[email protected]&phone=123-4567

enter image description here

I couldn't figure out how to get the First Name or Last Name to populate - tried all kinds of variations for the query params, maybe someone else will figure that part out.

Upvotes: 0

ReyAnthonyRenacia
ReyAnthonyRenacia

Reputation: 17651

This is the officially documented way of creating a contact:

Creating contacts To create a new contact, send an authorized POST request to the user's contacts feed URL with contact data in the body.

The URL is of the form:

https://www.google.com/m8/feeds/contacts/{userEmail}/full

With the appropriate value in place of userEmail.

Note: The special userEmail value default can be used to refer to the authenticated user. Upon success, the server responds with an HTTP 201 Created status code and the created contact entry with some additional elements and properties (shown in bold) that are set by the server, such as id, various link elements and properties.

Upvotes: 0

Related Questions