【问题标题】:add nickname to google group using api使用 api 将昵称添加到 google 组
【发布时间】:2013-07-10 15:47:07
【问题描述】:

我一直在尝试使用directory API 为组添加别名,但它似乎不起作用,这个功能已经可以使用了吗? 谢谢!

【问题讨论】:

    标签: google-groups


    【解决方案1】:

    是的,它工作正常。这是GAM 2.995 创建域别名供您参考的示例。我需要查看代码以确定您遇到问题的位置。

    $ touch gam/debug.gam
    $ gam create alias test-alias@jay.powerposters.org group testme@jay.powerposters.org
    
    Creating alias test-alias@jay.powerposters.org for group testme@jay.powerposters.org
    connect: (www.googleapis.com, 443)
    send: 'POST /admin/directory/v1/groups/testme@jay.powerposters.org/aliases?alt=json  HTTP/1.1
    Host: www.googleapis.com
    content-length: 44
    accept-encoding: gzip, deflate
    accept: application/json
    user-agent: Google Apps Manager 2.995 / jay@ditoweb.com (Jay Lee)
                / Python 2.7.4 final
                / Linux-3.8.0-26-generic-x86_64-with-Ubuntu-13.04-raring x86_64
                / google-api-python-client/1.1
    content-type: application/json
    authorization: Bearer ya29.XXX
    
    {"alias": "test-alias@jay.powerposters.org"}'
    
    reply: 'HTTP/1.1 200 OK\r\n'
    header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    header: Pragma: no-cache
    header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
    header: Date: Wed, 10 Jul 2013 17:34:38 GMT
    header: ETag: "2rnFeCLM59Q4Hv06VzEjKQtYAxk/uYyLVNg9ntD0jUUkkana74HyFfQ"
    header: Content-Type: application/json; charset=UTF-8
    header: Content-Encoding: gzip
    header: X-Content-Type-Options: nosniff
    header: X-Frame-Options: SAMEORIGIN
    header: X-XSS-Protection: 1; mode=block
    header: Content-Length: 112
    header: Server: GSE
    

    【讨论】:

    • 谢谢,我还没有尝试编码,我尝试了API页面中的API示例,它不起作用,所以我不知道我是否应该尝试尝试:) 我会试试看,谢谢你的帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-01-18
    • 1970-01-01
    • 1970-01-01
    • 2015-11-28
    • 2019-08-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多