我想在Google Plus上使用API创建帖子。我正在使用http协议来创建帖子,如下所示。无效凭证谷歌加API a
URL : https://www.googleapis.com/plusDomains/v1/people/me/activities
Method : POST
header parameter :
Content-Type :application/json
Authorization : "browser key"
我使用下面json
作为请求正文:
{
"object": {
"originalContent": "Happy Monday! #caseofthemondays",
},
"access": {
"items": [{
"type": "domain"
}],
"domainRestricted": true
}
}
现在1得到了响应:
Status : 401 Unauthorized
{
"error": {
"errors": [
{
"domain": "global", "reason": "authError",
"message": "Invalid Credentials", "locationType": "header",
"location": "Authorization"
}
],
"code": 401, "message": "Invalid Credentials"
}
}
我使用正确的密钥,也使谷歌加API和谷歌域API启用。任何人都可以帮助我如何使用Google Plus API创建帖子。我正在尝试使用HTTP协议在Google Plus上创建新帖子。
你有一个加域名帐户?您是否使用正确的范围进行身份验证?请显示您的验证码。您知道Google +网域与Google+网站不同吗? – DaImTo
@DaImTo我有谷歌加帐户可以ü帮我我如何创建谷歌域帐户 –
没有办法写信给Google+以编程方式它的只读API。谷歌域帐户是为谷歌应用程序,是不是一回事。 – DaImTo