GetLineApiAuthToken
GetLineApiAuthToken copied to clipboard
JSON returning empty
With a little debugging it turns out that the endpoint is returning a 403 Forbidden.
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/Nilpo/GetLineApiAuthToken/__main__.py", line 14, in <module>
authToken = GetLineAuthToken(username, password);
File "/Users/Nilpo/GetLineApiAuthToken/__main__.py", line 7, in GetLineAuthToken
return LineClient(username, password).authToken;
File "GetLineApiAuthToken/line/client.py", line 318, in __init__
self.login()
File "GetLineApiAuthToken/line/client.py", line 348, in login
j = self.get_json(self.LINE_SESSION_LINE_URL)
File "GetLineApiAuthToken/line/client.py", line 510, in get_json
return json.loads(self._session.get(url, headers=self._headers).text)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
how to solved like that ?