I’m using the same access token for the API calls that are failing as the ones that are succeeding.
Successful request:
GET /0/accounts/cj3ur/campaigns HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: OAuth gem v0.4.7
Authorization: OAuth oauth_consumer_key=\"po7Xfr5dz81Ularr9dHcSa2fD\", oauth_nonce=\"56PJLibx1moVehM3bw8pTiqJiRcZoaUzR1erP0f7nA\", oauth_signature=\"7bS2qE1DBcQJY2DjLsgiP36NKk4%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1424390850\", oauth_token=\"2349250652-oR3k7QRaiylBkcHRR8EizSqTdTPlQUwlwyLQKSU\", oauth_version=\"1.0\"
Connection: close
Host: ads-api.twitter.com
Failing request:
GET /0/stats/accounts/cj3ur?start_time=2015-02-13T00:00:00+00:00&end_time=2015-02-14T00:00:00+00:00 HTTP/1.1
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: OAuth gem v0.4.7
Authorization: OAuth oauth_consumer_key=\"po7Xfr5dz81Ularr9dHcSa2fD\", oauth_nonce=\"CRyC6S2NBdJkfLfwlUai7r38QpeIyBDY7KZUtlxq8\", oauth_signature=\"tym51Y7hN2z0Hs38c9NldsOH15w%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1424390975\", oauth_token=\"2349250652-oR3k7QRaiylBkcHRR8EizSqTdTPlQUwlwyLQKSU\", oauth_version=\"1.0\"
Connection: close
Host: ads-api.twitter.com
Failing response body:
{"errors":[{"code":"UNAUTHORIZED_ACCESS","message":"This request is not properly authenticated"}],"request":{"params":{}}}
Failing response headers:
HTTP/1.1 401 Authorization Required
connection: close
content-disposition: attachment; filename=json.json
content-encoding: gzip
content-length: 139
content-type: application/json;charset=utf-8
date: Fri, 20 Feb 2015 00:18:38 UTC
server: tsa_b
set-cookie: guest_id=v1%3A142439151803636126; Domain=.twitter.com; Path=/; Expires=Sun, 19-Feb-2017 00:18:38 UTC
strict-transport-security: max-age=631138519
x-connection-hash: 576bf43618531957a8178da24520f637
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-response-time: 87
x-runtime: 3.5E-5
x-transaction: 0840d51ed2b568dc
x-xss-protection: 1; mode=block