Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #53903

Re: python REST API access fails after adding date to URL

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'parameters': 0.04; 'subject:adding': 0.07; 'string': 0.09; 'append': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'api': 0.11; 'compute': 0.16; 'invalid.': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'string)': 0.16; 'subject:API': 0.16; 'subject:URL': 0.16; 'subject:access': 0.16; 'subject:after': 0.16; 'subject:fails': 0.16; 'subject:python': 0.16; 'header:User-Agent:1': 0.23; 'basis,': 0.24; '(or': 0.24; 'query': 0.26; 'header:X-Complaints-To:1': 0.27; 'rest': 0.29; 'parameters.': 0.31; 'writes:': 0.31; 'something': 0.35; 'add': 0.35; 'charset:us-ascii': 0.36; 'wrong': 0.37; 'requirements': 0.37; 'server': 0.38; 'to:addr:python-list': 0.38; 'expect': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'then,': 0.60; 'received:217': 0.63; 'email addr:gmail.com': 0.63; 'soon': 0.63; 'different': 0.65; 'great': 0.65; 'contact': 0.67; 'determine': 0.67; 'therefore': 0.72
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: python REST API access fails after adding date to URL
Date Tue, 10 Sep 2013 08:15:43 +0200
References <37fa354c-691c-45f9-ab31-807f86340e4d@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e09f3c.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:FWtShATRy5Pi2c5AA4cZbK22pFA=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.199.1378793757.5461.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378793757 news.xs4all.nl 15952 [2001:888:2000:d::a6]:41302
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53903

Show key headers only | View raw


mahsan9861@gmail.com writes:

> So the REST API calls work great with out the URL appended to the URL.However as soon as I do add the URL, because I want to retrieve the data on a daily basis, the calls fail and the server will return a 401 and say signature invalid.

Apparently, you do something wrong with the signing.

It is highly likely that you must append any request parameters (as
a query string) to the url before you determine the signature.

Alternatively, the web service you contact might not expect
a query string and might therefore not consider it when it
recreates the signature. Then, the signature check would fail
as you and the service compute it in a different way.

Check the available documentation for your web service.
Does it support request parameters (query strings). What
does it (or the "oauth" spec) about signature requirements
for those parameters.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

python REST API access fails after adding date to URL mahsan9861@gmail.com - 2013-09-09 09:36 -0700
  Re: python REST API access fails after adding date to URL dieter <dieter@handshake.de> - 2013-09-10 08:15 +0200
    Re: python REST API access fails after adding date to URL mahsan9861@gmail.com - 2013-09-10 07:33 -0700
      Re: python REST API access fails after adding date to URL mahsan9861@gmail.com - 2013-09-10 08:42 -0700
      Re: python REST API access fails after adding date to URL mahsan9861@gmail.com - 2013-09-10 08:44 -0700

csiph-web