使用 edu.au 域进行 Google Apps Auth

问题描述 投票:0回答:1

我正在尝试验证 google docs 范围的域。这是网址:

https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fwww.mydomain.edu.au%2Fcomponents%2Fgoogle%2FretrieveToken.php&scope=https%3A%2F%2Fdocs.google。 com%2Ffeeds%2F&session=1&secure=0&hd=default

所以我的域名是:www.mydomain.edu.au

但是当提出请求时,我得到了这个答案:

The page you have requested cannot be displayed. Another site was requesting access to your Google Account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows: 
 The site "http://edu.au" has not been registered.

因此它被识别为 edu.au 域名。

有办法解决这个问题吗?

谢谢

将文档上传到谷歌文档的示例代码:

public static function uploadDocs($data = array())
{
    if (!self::checkInput($data)) return false;
    $data['url'] = Google::docsAPIUrl.'default/private/full'.self::getFolder($data['folderId']);
    //"?convert=false" 
    $headers = Google::getAuthToken();
    array_push($headers, Google::getGData());
    $contentHeaders = self::getInputHeaders($data);
    array_push($headers, 'Content-Length: '.$contentHeaders['length']);
    array_push($headers, 'Content-Type: '.$contentHeaders['type']);
    array_push($headers, 'Slug: '.Html::win2utf8($data['docTitle']));
    if ($data['inputMethod'] == 'File')
    {
        $data['input'] = ((fread(fopen($data['input'], 'rb'), filesize($data['input']))));
    }
    $curl = Google::curl($data['url'], null, $data['input'], $headers);
    if (Curl::checkCode($curl['code']))
    {
        return self::parseNewXML($curl['response']);
    }
    else
    {
        Google::$error = array('errorCode'=>$curl['code'],'errorString'=>$curl['response']);
        return false;
    }
}
php authentication dns account
1个回答
0
投票

AuthSub 已弃用。您应该使用 OAuth 2.0Drive API v2

© www.soinside.com 2019 - 2024. All rights reserved.