79319973

Date: 2024-12-31 12:35:14
Score: 1.5
Natty:
Report link

Thank You ! It helped me debug and finde the issue. I did as @Justinas said:

try:
  httprequest = Request(base_url + end_point, data=postdata, method="POST", headers=headers)
  with urlopen(httprequest) as response:
    responddata = json.loads(response.read().decode())
  AccessToken = responddata['AccessToken']
  ServerId = responddata['ServerId']
  UserId = responddata['User']['Id']
except:
  AccessToken = "null"
  ServerId = "null"
  UserId = "null"

return {"ak_proxy": {"user_attributes": {"additionalHeaders": {"X-Emby-Token": AccessToken, "X-Emby-ServerId": ServerId, "X-Emby-UserId": UserId}}}}

I seperated each output and the issue was with the Value of ID. JSON Data is an array and the value if ID is part of User.

Reasons:
  • Blacklisted phrase (0.5): Thank You
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Justinas
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Asem Khen