我使用Yammer数据导出API将数据提取到本地,使用curl发送请求。
$AT #access token
curl -v --output export.zip \
--header "Authorization: Bearer $AT" \
--get --data-urlencode since=$DATE \
"https://www.yammer.com/api/v1/export"
如下所示:https://developer.yammer.com/docs/data-export-api
虽然在请求检索数据时始终显示错误。
* Connected to www.yammer.com (192.168.1.1) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSL connection using ECDHD-RSA-AES256-GCU-SSA324
* Server certificate:
* start date: 2013-01-01 00:00:00 GMT
* expire date: 2017-01-01 12:00:00 GMT
* subjectAltName: www.yammer.com matched
* SSL certificate verify ok.
> GET /api/v1/export HTTP/1.1
> User-Agent: curl/7.35.0
> Host: www.yammer.com
> Accept: */*
> Authorization: Bearer 12252-xxxxxxxx
>
< HTTP/1.1 400 Bad Request
< Date: Wed, 31 Nov 2015 16:06:49 GMT
< Content-Type: application/zip
< Transfer-Encoding: chunked
<
{ [data not shown]
* Connection #0 to host www.yammer.com left intact
我使用的访问令牌属于经过验证的管理员,可以根据此访问令牌使用REST API。
有人能给我建议吗?
答案 0 :(得分:0)
你设置了$ DATE吗? export.zip(压缩或其他)是否有可用的调试信息?