需要帮助创建Coldfusion App到Google Group API

use*_*230 4 api coldfusion google-groups-api oauth-2.0

首先,提前感谢阅读这篇文章的任何人.

我的学校(我是教师/技术协调员)正在使用Google Apps for Education.我使用Provisioning API与我们的Microsoft Active Directory服务器通信,以便将用户和组与Google同步.我有一个运行ColdFusion 9和PHP的Web服务器.我是一个基本的公平ColdFusion程序员,我的PHP技能是新手级别.

我有至少3028个组我想更新replyTo字段说REPLY_TO_LIST(默认情况下创建组时,用户可以选择)

理想情况下,我希望发生的事情是ColdFusion服务器自动(每晚)联系Google,获取域中所有组的列表(用户有权创建组,以便此列表可能每天更改)并确保回复字段设置正确.

目前,我遇到了OAuth 2.0的问题.我已经阅读了文档,并对我需要做什么感到困惑.我一直在寻找互联网,并发现了很多我头脑中的材料.我得到的最接近的是Ray Camden的精彩帖子.但是,当我为Google网上论坛修改它时,我得到:

错误:invalid_request缺少必需参数:response_type

但是,response_type肯定存在.

我很确定这是我的范围,这是我的问题的开始,我发现了多个不同的引用,例如:

以下是我目前在GoogleGroupModifier.cfm中的内容:

<cfset authurl = "https://accounts.google.com/o/oauth2/auth?" 
               & "client_id=#urlEncodedFormat(application.clientid)#" 
               & "&redirect_uri=#urlEncodedFormat(application.callback)#" 
               & "&scope=https://www.googleapis.com/auth/apps.groups.settings?response_type=code">

<cfoutput>
    /groups/v1/groups/
    authurl=#authurl#
    <p><a href="#authurl#">Login</a></p>
</cfoutput>
Run Code Online (Sandbox Code Playgroud)

和Application.cfc:

<cfcomponent>
    <cfset This.name = "googlegroups">
    <cfset This.Sessionmanagement="True">

    <cffunction name="onApplicationStart" returntype="boolean" access="public">
        <cfset application.clientid = "88888.apps.googleusercontent.com">
        <cfset application.clientsecret="zzzzzz_">
        <cfset application.callback="http://mydomain.org/wwp/google/GoogleGroupModifier.cfm">
        <cfreturn true>
    </cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

有人可以提供任何建议吗?我知道有关于GITHUB的信息,但是我在那里试过的东西我似乎无法开始工作.

Mat*_*ord 6

我在Github上有一个OAuth2 cfc,可以为你构建所需的auth和端点URL:https://github.com/coldfumonkeh/oauth2