GetStream / stream-django

Django Client - Build Activity Feeds & Streams with GetStream.io
https://getstream.io
BSD 3-Clause "New" or "Revised" License
452 stars 80 forks source link

signature is invalid exception #79

Closed guybowden closed 6 years ago

guybowden commented 6 years ago

I'm getting a signature is invalid error when trying to use the feed_manager or even the stream_client like so:

>>> from stream_django.client import stream_client
>>> stream_client.feed('user', 1).get()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/guy/Dev/seekr2/VENV/lib/python2.7/site-packages/stream/feed.py", line 128, in get
    self.feed_url, params=params, signature=token)
  File "/Users/guy/Dev/seekr2/VENV/lib/python2.7/site-packages/stream/client.py", line 265, in get
    return self._make_request(self.session.get, *args, **kwargs)
  File "/Users/guy/Dev/seekr2/VENV/lib/python2.7/site-packages/stream/client.py", line 213, in _make_request
    return self._parse_response(response)
  File "/Users/guy/Dev/seekr2/VENV/lib/python2.7/site-packages/stream/client.py", line 153, in _parse_response
    self.raise_exception(parsed_result, status_code=response.status_code)
  File "/Users/guy/Dev/seekr2/VENV/lib/python2.7/site-packages/stream/client.py", line 253, in raise_exception
    raise exception
NotAllowedException: signature is invalid

However, if I import the client direct from stream it works (in the same Django shell session)

>>> import stream
>>> client = stream.connect(settings.STREAM_API_KEY, settings.STREAM_API_SECRET)
>>> f = client.feed('user', 1)
>>> f.get()
{...feed...}

If I check stream_client.api_key and stream_client.api_secret they are correct..

What have I done wrong?

guybowden commented 6 years ago

ignore me... late night (mismatch api key and secret)