Comments (5)
can you attach information about the request from JS? (url, get params, headers) as well as the value of user.id
server-side?
from stream-python.
Request
Request URL:https://api.getstream.io/api/v1.0/feed/user/1/?limit=5&offset=0&api_key=te5vptfdhrss&location=unspecified
Request Method:GET
Status Code:403 Forbidden
Remote Address:54.230.90.148:443
Reponse
HTTP/1.1 403 Forbidden
Content-Type: application/json
Content-Length: 126
Connection: keep-alive
Access-Control-Allow-Origin: *
Allow: GET, POST, DELETE, HEAD, OPTIONS
Content-Encoding: gzip
Date: Fri, 06 May 2016 18:03:02 GMT
Server: nginx/1.4.6 (Ubuntu)
Vary: Accept
X-Cache: Error from cloudfront
Via: 1.1 650859fa2cd80d54569500386ec0cbcc.cloudfront.net (CloudFront)
X-Amz-Cf-Id: QGLpLNfj7Lm8zKyPal7EaWJ7UxPb7pY9j48xYid8AHY8tBOXcOZWvg==
Request
Request Headers
GET /api/v1.0/feed/user/1/?limit=5&offset=0&api_key=te5vptfdhrss&location=unspecified HTTP/1.1
Host: api.getstream.io
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Authorization: user1 b'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY3Rpb24iOiJyZWFkIiwicmVzb3VyY2UiOiIqIiwiZmVlZF9pZCI6InVzZXIxIn0.IfVux-ZWZAkWTCzgH0sBibRWhFpB9HEriVYtf-lSRAQ'
stream-auth-type: simple
Origin: http://localhost:8080
X-Stream-Client: stream-javascript-client-browser-unknown
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36
accept: application/json
Referer: http://localhost:8080/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Query String params
limit:5
offset:0
api_key:te5vptfdhrss
location:unspecified
response body
{"code": null, "detail": "url signature missing or invalid", "duration": "7ms", "exception": "AuthenticationFailed", "status_code": 403}
The user.id server side is 1
from stream-python.
you are converting the readonly_token (bytes) into string incorrectly, the result is that you end up with its representation (which is almost the same except for the b'' wrap).
this change should get fix your problem:
str(readonly_token)
with:
readonly_token.decode("utf-8")
from stream-python.
Thank you. That fixed my issues. Should this be added to the documentation that it needs to be decoded in this way? Its confusing, because .token doesn't need to be decoded in this way, and .token is automatically serialized to json without decoding in this manner.
from stream-python.
next release does that, thank you for reporting this!
from stream-python.
Related Issues (20)
- Should drop the reference to outdated read the docs?
- Parse activity.time as UTC
- Add batch unfollow_many support
- Drop python 2 support
- Add enrichment support for activity get
- Setup pylint HOT 2
- Cannot control the reference id of collection entry HOT 2
- Max retries exceeded with url / connection refused HOT 1
- How Do I make a new feature request for Stream-Python? HOT 1
- Support for Async code? HOT 1
- can only concatenate str (not "bytes") to str HOT 4
- followStats() function missing HOT 1
- Is it possible to use channel.get_replies async? HOT 1
- Typing support missing
- Add a new way to query all users HOT 1
- Enable Noise Cancellation: Update HOT 1
- own reactions HOT 8
- Unable to retrive specific kind of reactions. HOT 2
- Proposal: simplify implementation by dropping intermediary variable HOT 2
- Stop using strict versions in requires HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-python.