0

我正在尝试以下请求:

OAuth.popup('google').done(function(google) {
        google.post('/gmail/v1/users/me/labels', {
            data: JSON.stringify({
                userId: 'me',
                label: {
                    name: 'SmartMail'
                }
            }),
            dataType: 'json', 
            contentType: 'application/json; charset=utf8' 
        }).done(function (result) {
            console.log('result: ', result);
        }).fail(function (error) {
            console.error('error: ', error);
        });
    }).fail(function(err) {
        console.error('google: fail', err);
    });

这是按照这个例子:oauth.io subscribe user to youtube channel

但是我收到以下错误:

{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "invalidArgument",
        "message": "Invalid request"
      }
    ],
    "code": 400,
    "message": "Invalid request"
  }
}

知道有什么问题吗?

4

1 回答 1

0

漠视。令人困惑的 Gmail 文档。

于 2016-03-09T17:15:37.023 回答