Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 145465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:25:42+00:00 2026-05-11T08:25:42+00:00

I know this is simple, but I haven’t used Zend_Gdata before, so I need

  • 0

I know this is simple, but I haven’t used Zend_Gdata before, so I need some guidance. Please correct me if any of my assumptions are incorrect.

I am using Google Apps on my domain, so to get started, I would like to do something simple like listing all the users on the domain.

From what I understand, you need to use Zend_Gdata_ClientLogin instead of Zend_Gdata_AuthSub since I will be working with Zend_Gdata_Gapps. This is what I’ve got so far:

$client = Zend_Gdata_ClientLogin::getHttpClient('admin@mydomain.com', 'password'); $gdata = new Zend_Gdata_Gapps($client, 'mydomain.com'); $users = $gdata->retrieveAllUsers(); 

However, retrieveAllUsers() is throwing an exception with this message:

Expected response code 200, got 401 <HTML> <HEAD> <TITLE>Token invalid</TITLE> </HEAD> <BODY BGCOLOR='#FFFFFF' TEXT='#000000'> <H1>Token invalid</H1> <H2>Error 401</H2> </BODY> </HTML> 

What does that mean? What am I doing wrong? I don’t know if it matters, but I am running this PHP script locally, but my Google Apps are running on a remote server. I am using Zend Framework version 1.7.5.

Update: If anyone is wondering, there were a few more problems I ran into while doing this. I found out that in order to use Zend_Gdata, you have the enable the ‘Provisioning API’ in the admin section of your Google Apps. I found out that I only have the standard (free) version of Google Apps, which means that the Provisioning API is not available to me unless I have a premier (paid) version of Google Apps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:25:42+00:00Added an answer on May 11, 2026 at 8:25 am

    You’re missing the service parameter, for Google Apps it’s 'apps'

    $client = Zend_Gdata_ClientLogin::getHttpClient('admin@mydomain.com', 'password','apps'); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please forgive my programming knowledge. I know this is a simple thing, but I
I know this must be a fairly simple question, but I haven't managed to
I know this question has been asked but I haven't found any satisfactory answers.
I know this is a simple question for someone out there, but I have
this is simple I know, but i don't have internet access and this netcafes
I know this is simple but I am not able to get it right
I know this probably really simple but Im not sure what im doing wrong...
I know this is really simple but I cant find the docs for this
I know this is a really simple question but my google-fu is failing me.
I know this is most-likely a simple question but when you restore a database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.