Skip to content
Advertisement

python coinbase pro sandbox authentication request error

Trying to use the example python from the coinbase pro api to do an authenticated request… it doesn’t work going to the sandbox. I get the following error. Isn’t there a simple request example that works on the web somewhere?

JavaScript

Here is what I get back….

200

Traceback (most recent call last):

File “/Users/rockie12_us/PythonScriptsDeanO/SandBoxClientTest/test9.py”, line 46, in jprint(r.json())

File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/models.py”, line 897, in json return complexjson.loads(self.text, **kwargs)

File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/init.py”, line 346, in loads return _default_decoder.decode(s) File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py”, line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File “/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py”, line 355, in raw_decode raise JSONDecodeError(“Expecting value”, s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[Finished in 0.6s with exit code 1]

Advertisement

Answer

To fix this I had to change this line

JavaScript

to

JavaScript

nothing in the api mentioned this needed to be binary string, that would have helped greatly.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement