Error accessing Address component

Got an error trying the Address component.

My code:
import requests

response = requests.get(f"https://app.coco.imperson.com/api/exchange/get_address_vp3/12345",
                        json={"user_input": "Test"})

print(response.json())

Error:
print(response.json())
File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 897, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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)

Anyone?

Hi,

As I see the problem is that you called the component using GET method.
What an error at the response and the json library could not serialize it.

Here is the fix:

import requests
response = requests.post(f"https://app.coco.imperson.com/api/exchange/get_address_vp3/12345",
                        json={"user_input": "Test"})
print(response.json())

And a link to the API DOC:
https://docs.conversationalcomponents.com/api/

Hope I helped you,
Victor