0

while use graphiql in browser its works.But while using in postman unable to fetch. how to pass authorization token with requests if there is way where to fetch authorization token from this module

{
 "jsonrpc": "2.0",
  "id": null,
  "error": {
  "code": 100,
   "message": "Odoo Session Expired",
  "data": {
  "name": "odoo.http.SessionExpiredException",
  "debug": "Traceback (most recent call last):\n File "/home/ssd-01/Documents/Projects/school_bus      /odoo/http.py", line 619, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File "/home/ssd-01/Documents/Projects/school_bus/odoo/http.py", line 309, in _handle_exception\n raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])\n File "/home/ssd-01/Documents/Projects/school_bus/odoo/tools/pycompat.py", line 14, in reraise\n raise value\n File "/home/ssd-01/Documents/Projects/school_bus/addons/http_routing/models/ir_http.py", line 443, in _dispatch\n cls._authenticate(func.routing['auth'])\n File "/home/ssd-01/Documents/Projects/school_bus/odoo/addons/base/models/ir_http.py", line 124, in _authenticate\n getattr(cls, "auth_method%s" % auth_method)()\n File "/home/ssd-01/Documents/Projects/school_bus/odoo/addons/base/models/ir_http.py", line 97, in _auth_method_user\n raise http.SessionExpiredException("Session expired")\nodoo.http.SessionExpiredException: Session expired\n",
 "message": "Session expired",
 "arguments": [
 "Session expired"
    ],
 "exception_type": "internal_error"
 }
 }
}
Chris Schaller
  • 13,704
  • 3
  • 43
  • 81
  • This is a common issue in Postman tags, so I've added it. the question is good enough, anyone who uses graphql in Postman should be able to answer this, it's just about how to inject auth tokens – Chris Schaller Nov 14 '19 at 12:32
  • yeah thats problem @ChrisSchaller – saikiruba.mj Nov 19 '19 at 10:49
  • Sorry that comment I put in the wrong field, was trying to get this question out of the close queue, I can't help with graphiql, but I recognise the issue from when dealing with other service types, you have to pass the auth token or user object in the request, but each service is different, capture the network traffic from a runtime that works, post an example here and we can help show you how to generate the same auth in Postman – Chris Schaller Nov 20 '19 at 06:38

0 Answers0