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 8053725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:56:41+00:00 2026-06-05T07:56:41+00:00

I try to retrieve a contact with gdata.contacts.client : Auth : class ModifyMe(webapp.RequestHandler): @login_required

  • 0

I try to retrieve a contact with gdata.contacts.client :

Auth :

class ModifyMe(webapp.RequestHandler):

    @login_required
    def get(self):
        """print contacts"""
        current_user = users.get_current_user()
        access_token_key = 'access_token_%s' % current_user.user_id()
        token = gdata.gauth.ae_load(access_token_key)
        gcontacts_client = gdata.contacts.client.ContactsClient(source = SETTINGS['APP_NAME'])
        gcontacts_client = token.authorize(gcontacts_client)

According to API documentation, i tried this :

        contact = gcontacts_client.GetContact('https://www.google.com/m8/feeds/contacts/yohann%40mail.info/base/2e091c5e9b3d60b4')

But i had this error :

Traceback (most recent call last):
  File "/base/data/home/apps/s~yoyocontacts/2.359462823193148133/main.py", line 246, in PrintContact
    contact = gd_client.GetContacts('https://www.google.com/m8/feeds/contacts/yohann%mail.info/base/2e091c5e9b3d60b4')
  File "/base/data/home/apps/s~yoyocontacts/2.359462823193148133/gdata/contacts/client.py", line 201, in get_contacts
    desired_class=desired_class, **kwargs)
  File "/base/data/home/apps/s~yoyocontacts/2.359462823193148133/gdata/client.py", line 640, in get_feed
    **kwargs)
  File "/base/data/home/apps/s~yoyocontacts/2.359462823193148133/gdata/client.py", line 319, in request
    RequestError)
RequestError: Server responded with: 400, 

Ok, try again :

        contact = gcontacts_client.GetContact('www.google.com/m8/feeds/contacts/yohann%40mail.info/base/2e091c5e9b3d60b4')

An other error :

Traceback (most recent call last):
  File "/base/data/home/apps/s~yoyocontacts/2.359462880270555204/main.py", line 246, in PrintContact
    contact = gd_client.GetContact('www.google.com/m8/feeds/contacts/yohann%40lepage.info/base/2e091c5e8b3760b4')
  File "/base/data/home/apps/s~yoyocontacts/2.359462880270555204/gdata/contacts/client.py", line 89, in get_contact
    desired_class=desired_class, **kwargs)
  File "/base/data/home/apps/s~yoyocontacts/2.359462880270555204/gdata/client.py", line 652, in get_entry
    desired_class=desired_class, **kwargs)
  File "/base/data/home/apps/s~yoyocontacts/2.359462880270555204/gdata/client.py", line 267, in request
    uri=uri, auth_token=auth_token, http_request=http_request, **kwargs)
  File "/base/data/home/apps/s~yoyocontacts/2.359462880270555204/atom/client.py", line 119, in request
    http_request.method, str(http_request.uri)))
MissingHost: No host provided in request GET https://Nonewww.google.com/m8/feeds/contacts/yohann%40mail.info/base/2e091c5e8b3760b4

Oh wait ! https:// None http://www.google.com/m8/feeds/contacts/yohann%40mail.info/base/2e091c5e8b3760b4

How fix this behavior ? Why there is None between https:// and uri ?

PS : feed_groups = gd_client.GetGroup(group_url) works like a charm…

PS : Source fileSource file function ModifyMe

  • 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. Editorial Team
    Editorial Team
    2026-06-05T07:56:43+00:00Added an answer on June 5, 2026 at 7:56 am

    I think you are using the wrong url, the correct one looks like the following:

    https://www.google.com/m8/feeds/contacts/<email>/base/<contactId>
    

    Where <email> is the email address of the user you are requesting the contact for (obviously, you must be authorized to access those contacts). This field can also assume the value “default” to replace the email address of the currently authenticated user.

    contactId is the identifier of the contact as returned by the API. I think you got this right.

    Also, make sure the protocol is https and not http.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get a Data type mismatch criteria expression error when i try to retrieve
I have a user id from a synced contact, I now try to retrieve
I use the following code to display list of contacts, and then retrieve contact
I try to retrieve a list of the attribute values of the children of
I am currently try to retrieve a latitude and longitude value from a location.
I have an xml file which I try to retrieve some information using linq
I am trying to get the contact's phone number after I have retrieved their
I managed to get the access token for google's contacts API but when i
Try yourself : as example, try to retrieve the fields of this video :
I try to retrieve how to scan wireless networks on the windows phone. I

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.