"Invalid Request URI" when trying to add a member to a group

331 views
Skip to first unread message

Glen Holcomb

unread,
Jun 8, 2012, 12:15:23 PM6/8/12
to google-app...@googlegroups.com
I'm working with the REST API and am receiving an "Invalid request URI" when trying to add a member to a group.  My request URI appears to match the format provided in the documentation.


I get the same error when I specify the full email addresses of the group and user.  Any ideas what the request URI should actually look like?

Claudio Cherubino

unread,
Jun 8, 2012, 1:15:54 PM6/8/12
to google-app...@googlegroups.com
Hi Glen,

The url to add a member to the group has the following format:


Where "domain" and "groupId" are the only parameters you have to replace. 
In your case, the url should look like:


Your request must send the email address of the member to be added in the body of the request, which has to look like the following:

<?xml version="1.0" encoding="UTF-8"?>
    <apps:property name="memberId" value="some...@gmail.com"/>
</atom:entry>

Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/sQSrx3D4Fj0J.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Glen Holcomb

unread,
Jun 8, 2012, 2:43:04 PM6/8/12
to google-app...@googlegroups.com
Thanks Claudio,

I'll give that a shot.  The documentation doesn't mention anything about the POST body.  It there another URL with complete Protocol documentation?

-Glen

Claudio Cherubino

unread,
Jun 8, 2012, 2:52:03 PM6/8/12
to google-app...@googlegroups.com
Hi Glen,

There's a reference guide at https://developers.google.com/google-apps/provisioning/reference but the POST body used to be included in the developer's guide as well.
It looks like some parts of the docs might have not been migrated properly from the previous format, I'll see if they can be restored.
Thanks

Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Glen Holcomb

unread,
Jun 9, 2012, 11:28:46 AM6/9/12
to google-app...@googlegroups.com
This is very strange.

I am still getting the Invalid request URI error when trying to add a member to the group.

I am sending my POST request to the following URI:


I've tried the full email address for both the group and user as well but I still get "Invalid request URI"

I'm including the following document in the POST body although the error would lead me to believe it isn't getting that far:

<?xml version="1.0" encoding="UTF-8"?>
  <apps:property name="memberId" value="lhol...@cnm.edu"/>
</atom:entry>

I've also verified that I'm authenticated although that should generate an Invalid Token error rather than a URI error.

I can create and delete groups just fine I just can't seem to add members to a group.

On Friday, June 8, 2012 10:15:23 AM UTC-6, Glen Holcomb wrote:

Claudio Cherubino

unread,
Jun 9, 2012, 2:09:59 PM6/9/12
to google-app...@googlegroups.com
Hi Glen,

The URI you are using is still invalid, the correct one is:


Please note that "member" in the url above must NOT be replaced with the username of the account to be added. That data only goes in the request body.

Claudio

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

Glen Holcomb

unread,
Jun 9, 2012, 6:06:15 PM6/9/12
to google-app...@googlegroups.com
Thanks Caludio,

Sorry for the density on this end.  It's working now that I'm doing it correctly ;)

-Glen

To post to this group, send email to google-apps-mgmt-apis@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt-apis+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages