dongzhang5006 2015-01-27 18:49
浏览 15

Google联系人API更新联系人 - 未找到

So, I can retrieve contacts and insert contacts, but I'm having a problem updating contacts. All I get is a 404 "Not found" error. The xml is well-formed, since I can do the inserts, but it seems that the URL I'm using doesn't work? I have tried:

https://www.google.com/m8/feeds/contacts/{my email}/full/{contact id}

I have also tried:

https://www.google.com/m8/feeds/contacts/default/full/{contact id}

and also used the ID that comes back from the retrieval query:

http://www.google.com/m8/feeds/contacts/{my email}/base/{contact id}

The headers I'm sending are:

Content-Type: application/atom+xml
Depth: 1
Authorization: Bearer {Auth Code}
GData-Version: 3.0
If-Match: *

More Details: I have modified my code so that when it does the GET of the contact, it grabs the edit link from the contact XML:

https://www.google.com/m8/feeds/contacts/awallace%40ihouseweb.com/full/{contactID}

And uses that for the URL, and ensured that I am using a "PUT" by:

curl_setopt($curl, CURLOPT_PUT, true);

And now it behaves differently - it says that I need to login:

<internalReason>Login Required</internalReason>

Even though my Auth token is valid for another hour. Arg.

thanks, andy

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多址通信方式的抗噪声性能和系统容量对比
    • ¥15 winform的chart曲线生成时有凸起
    • ¥15 msix packaging tool打包问题
    • ¥15 finalshell节点的搭建代码和那个端口代码教程
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 海浪数据 南海地区海况数据,波浪数据
    • ¥20 软件测试决策法疑问求解答