API does not work


Currently contains 1 post


July 05, 2018 01:51

Nelvin Tan

<p>Where do I put the authentication ID in the API? Putting it in TOKENS does not help</p> <p>import http.client</p> <p>conn = http.client.HTTPSConnection(“api.ambiverse.com”)</p> <p>payload = “{\”coherentDocument\“: \”true\“, \”confidenceThreshold\“: \”0\“, \”docId\“: \”doc1\“, \”text\“: \”When Who played Tommy in Columbus, Pete was at his best.\“, \”language\“: \”en\“, \”annotatedMentions\" : [ { \charLength\, \charOffset\ } ] }"</p> <p>headers = {<br />‘content-type’: “application/json”,<br />‘accept’: “application/json”,<br />‘authorization’: “Bearer: TOKEN”<br />}</p> <p>conn.request(“POST”, “/v2/entitylinking/analyze”, payload, headers)</p> <p>res = conn.getresponse()<br />data = res.read()</p> <p>print(data.decode(“utf-8”))</p>
Reply to thread