I would like to know how to get all contacts related to a group.
Let's say I have a contact group named "My Special Group" and the ID is xxxxxxx.I just want to retrieve contact under the "My Special Group" only.
I have already tried this Request URI and test it on oauth2 playground:
https://www.google.com/m8/feeds/contacts/default/full/?group=xxxxxxx.
https://www.google.com/m8/feeds/contacts/myemail%40gmail.com/full/?group=xxxxxxx.
And the result is:
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<internalReason>Supposed groupUri xxxxxxxxdoes not match template</internalReason>
</error>
</errors>
What exactly the correct Request URI to retrieving contacts related to specific group?
Already walked around stackoverflow & the answer is exactly what I do above.Its failed.
Okay fellas. I found the answer.Here it is.
The supposed Request URI to retrieve contacts related to a contact group is like this:
https://www.google.com/m8/feeds/contacts/default/full?&group=http://www.google.com/m8/feeds/groups/yourmail%40gmail.com/base/xxxxxxx
where xxxxxx is the contact group id.
Before this I'm using this Request URI :
https://www.google.com/m8/feeds/contacts/default/full?&group=xxxxxxx
where xxxxxx is the contact group id and the result is will be failed because I'm just put the group id instead of use full uri of contacts group .
So that's all.Hope its help.
Related
I need retrieving all the envelopes that have been signed or sent to an email.
I was trying to do this using the 'accounts/{account_id}/envelopes' endpoint passing the 'search_text' query param. As in the example in documentation https://developers.docusign.com/esign-rest-api/guides/concepts/envelopes/search
/v2.1/accounts/{account_id}/envelopes?search_text=Tabs
But I'm getting always error 400 - INVALID_REQUEST_PARAMETER. Am I doing this in the wrong way?
I think 4644 is most likely not your account ID. can you check what is your account ID?
Also, add :
&from_date=2019-03-04T00:00:00.000Z&to_date=2019-03-07T00:00:00.000Z
I'm trying to pull the latest sends from all my campaigns in Mailchimp via the 3.0 API. The only way I seem to be able to do this is:
1) Search for a given member by email
/3.0/search-members?query=joe#example.com
2) Get the member ID and request their activity
3.0/lists/{LIST ID}/members/{USER ID}/activity
3) Pull the content of the email in their activity feed:
3.0/campaigns/{CAMPAIGN ID}/content
The problem with this is that I need to know the user's email in advance and then search by each user individually, meaning many wasted of API calls.
Is there an endpoint for campaigns that I can request the last sends for a given date range?
The /campaigns endpoint returns campaigns for a given list and each returned object does include a recipients property.
You may also want to checkout:
/search-campaigns
And:
/reports/{campaign_id}/sent-to
How can I find the userId of the student to which a CourseWorkSubmission has been submitted?
Steps:
Student is assigned coursework using Google Classrooms.
Teacher views coursework (docs.google.com URL).
I click Add On, to try and pull out student info, but can't find the context for the student (e.g. userId, actorId) or even the submissionId in order to make a call to the API to get the information.
Any help or pointers gratefully received :)
References:
Have checked out the Google Classroom API:
https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get
And the Google Drive API:
https://developers.google.com/drive/v3/web/about-sdk
When you do your get of the studentSubmission here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get the response will contain a userId. That userID is the Students google ID you're looking for.
Go ahead and run the Try this API functionality on the https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/get page and you should see what I"m talking about.
The full response information is listed here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions
If you're having a problem finding the relevant courseWork ID, then use the list capability here https://developers.google.com/classroom/reference/rest/v1/courses.courseWork.studentSubmissions/list (Put a - in for the courseWorkId)
I want to send a POST request on Google Contacts API. It works well at the moment.
But I wonder why I get a 400 Bad Request Error if I don't specify a phone number.
<?xml version="1.0" encoding="UTF-8"?>
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<internalReason>Phone number must not be empty</internalReason>
</error>
</errors>
If someone knows if I can bypass it ?
Notice that when you add a contact on Google Contacts, there's not this restriction.
You're getting that error because it's stated in the docs that these extension elements need to be provided a rel attribute or a label attribute:
In the Contacts Data API, several elements are slightly more
restrictive than indicated in the documentation for the Contact kind.
In particular, a client must supply either a rel attribute or a label
attribute, but not both, for the following elements:
gd:email gd:im gd:organization gd:phoneNumber gd:postalAddress
In short, you really need to provide the phone number.
I have been unable to return any UserDefined/custom fields for a contact. I'm not even wanting to create or update an existing entry as per Programatically adding "New Custom Field" To Google Contacts using Google contact API
I have followed the guide here https://developers.google.com/google-apps/contacts/v3/reference, but still to no avail.
I've called both
https://www.google.com/m8/feeds/contacts/default/full?alt=json
and
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json
in an attempt to get ALL of the values returned. I thought I might have to call each contact id specifically to get the full details, but that doesn't work either.
DEADBEEF is clearly replaced with a valid contact id in my scenario.
/contacts/default determines that request should return contacts for the current auth'd user, which is myself in this case.
Has anyone managed to return custom values, is this even possible?
Thanks
I found the answer, add the ?v=3.0 to the url string eg
https://www.google.com/m8/feeds/contacts/default/full/DEADBEEF?alt=json&v=3.0
However, you should use the preferred method of adding a GData-Version header.