【问题标题】:People API 'copyOtherContactToMyContactsGroup' is returning a 404 errorPeople API 'copyOtherContactToMyContactsGroup' 返回 404 错误
【发布时间】:2021-05-26 22:15:45
【问题描述】:

我正在尝试通过 People API 自动将“隐藏”/“其他联系人”移动到“我的联系人”组/成员中,但我收到 404 not found 错误。

我的简化代码如下所示:

function copyOtherContactToMyContactsGroup() {

    var otherContactsList = People.OtherContacts.list({
        pageSize:10,
        readMask: 'emailAddresses,names,phoneNumbers',
    });

    var otherContacts = otherContactsList.otherContacts;

    for(var oC in otherContacts) {
        var resourceName    = otherContacts[oC].resourceName;
        People.OtherContacts.copyOtherContactToMyContactsGroup(resourceName, {"copyMask": "emailAddresses,names,phoneNumbers"});
    };
}
var resourceName    = "otherContacts/c1528566360341757340";

我已经成功使用了具有上述资源名称的 API Explorer。

感谢您的任何帮助或建议。

【问题讨论】:

    标签: google-people-api


    【解决方案1】:

    看起来您遇到的问题实际上可能是一个错误。

    考虑到这一点,我已在 Google 的问题跟踪器 here 上提交了一份报告。

    我建议您为该问题加注星标,并最终添加一条评论,说明您会受到它的影响,因为任何更新都会在此处发布。

    【讨论】:

      【解决方案2】:

      谢谢@ale13

      Google 回应说 JSON 需要在资源名称之前进行调整。

      更正的代码行

      People.OtherContacts.copyOtherContactToMyContactsGroup({"copyMask": "emailAddresses,names,phoneNumbers"}, resourceName);

      【讨论】:

        猜你喜欢
        • 2023-03-23
        • 1970-01-01
        • 2015-05-16
        • 2017-01-14
        • 2021-09-30
        • 1970-01-01
        • 2021-11-02
        • 2022-08-21
        • 2019-06-19
        相关资源
        最近更新 更多