how to retrieve given names and last names from google apps domain via api in php
===

I'm using this php client library for google apps  - https://code.google.com/p/google-api-php-client/

There is an example script in there for retrieving contacts, which works. But my goal is to retrieve given name, last name and email address for everyone in my google apps domain. So I replaced this

    $req = new apiHttpRequest("https://www.google.com/m8/feeds/contacts/default/full");

with this

    $req = new apiHttpRequest("https://www.google.com/m8/feeds/profiles/domain/<mydomain.com>/full");

which I got from here https://developers.google.com/google-apps/profiles/, but it does not work. 

I have registered my app and got the client_id and so on which I know are working because it retrieves my contacts. Also I know that the script is not specific to contacts, because by editing the url and also the scope parameter I was able to use it to retrieve all the org units from my domain. 

I don't have to use the profiles api if there is another way to get first name, last name and email adress for every user.

This is my first go with the google api so please feel free to make any suggestions no matter how obvious they seem to you. Thanks!