Google Plus域名Api HTTP请求 - 添加人员失败 [英] Google Plus Domains Api HTTP Request - add people fails

查看:244
本文介绍了Google Plus域名Api HTTP请求 - 添加人员失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好
我正在尝试使用HTTP请求服务与Google +域api进行整合,但我遇到了一些问题。

i' m使用oauth 2.0验证我的连接,我的get和delete请求正常工作,但post和put请求总是回复错误的请求。



我已经将请求指向我的计算机和更改为http在这里捕捉他是一个添加人圈出请求。

  PUT / plus / v1domains /circles/16934bff8fa1939apeople?email=fakeuser%40example.com HTTP / 1.1 
授权:承载者ya29.xnxnxnxnxnxnxnxnxnxnxxn-nxnxnxnxnx
X-JavaScript-User-Agent:Google API Explorer
Host:192.168。 21.143
Content-Length:1
Accept-Encoding:gzip,deflate
Connection:Keep-Alive

我在heather上使用持票人,而不是url请求中的api键,因为这是获取和删除工作的唯一方式。
如果没有API键,get和delete请求会正常工作,但put和post请求会返回以下响应:

  BadRequest
{
error:{
errors:[
{
domain:global,
reason: 无效,
消息:无效值
}
],
代码:400,
消息:无效值



解决方案

它应该是:

  PUT / plus / v1domains / circles / 16934bff8fa1939a / people?email = fakeuser %40example.com HTTP / 1.1 


Good morning i'm trying to integrate with google+ domains api using HTTP Requests to the service but i'm facing some problems.

i'm using oauth 2.0 to authenticate my connection and my get and delete requests work fine but the post and put requests always reply bad request.

i've pointed the request to my computer and change to http to catch him here is the catch for a add person to circle put request.

PUT /plus/v1domains/circles/16934bff8fa1939apeople?email=fakeuser%40example.com HTTP/1.1
Authorization: Bearer ya29.xnxnxnxnxnxnxnxnxnxnxxn-nxnxnxnxnx
X-JavaScript-User-Agent: Google APIs Explorer
Host: 192.168.21.143
Content-Length: 1
Accept-Encoding: gzip, deflate
Connection: Keep-Alive

i'm using the bearer on the heather but not the api key in the url request because it was the only way of get's and deletes work. Without the API key the get and delete requests works properly but the put and post requests returns the following response:

BadRequest"
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
    }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

解决方案

Your request is malformed and missing a slash. It should be:

PUT /plus/v1domains/circles/16934bff8fa1939a/people?email=fakeuser%40example.com HTTP/1.1

这篇关于Google Plus域名Api HTTP请求 - 添加人员失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆