Having a hard time connecting python to the inquire rest APIs. Seems to work just fine in Postman, but I try and throw it into python all I get is 403 forbidden. Played around with this for a better part of a day here but no luck. Anyone had any luck with this?
Hi @JasonMed ,
great to see you around in the Forum. The 403 seems to come up due to the connection you try to establish between a Python user agent and the Inquire API in SaaS - which then gets blocked by the Web Application Firewall. You could try it by using a different user agent (or no agent if possible).
If there’s no hard requirement for you in using Python, I would suggest to use Groovy and follow our teneo.ai tutorial - Teneo Inquire client | Reference documentation | Teneo Developers
Hope this helps,
/Benjamin
Thanks for the reply, but I got it to work by using http.client and not requests. Just something about how the requests package is doing things.
Great, happy to hear that!
For anyone trying with Python requests module, when I tried this it appeared the default ‘useragent’ header used by the requests model (e.g. ‘python-requests/2.25.0’) was blocked on the Teneo side. Try using a different value.