HTTP Request API Authentication issue

Hi,

I’m trying to setup a workflow to retrieve data via REST API from one of our suppliers, but am stuck with the authentication. The initial request should be a POST to api.xxxxx.com/auth/token using a username and password to retrieve a token that is used on subsequent requests. This is working using Postman so i know the credentials i’m using are correct, but i can’t get it to work in insightConnect.

So far, I’ve tried creating a, HTTP Request connection using Basic Authentication, with the base URL set to api.xxxxx.com/auth/token with a username and password set. This results in a “Authentication Details were not provided error”. All changes to the connection result in the same error (apart from changing the URL entirely which obviously results in an error)

With another supplier API in the past I have selected no authentication\custom authentication, set the base url to api.xxxx.com and let the connection fail, but then set the REST step in the workflow with a route of /auth/token and added the username\password into the body and that has worked, but in this case that results in an error ‘“detail”:“Method "GET" not allowed.”’, although this is definitely a POST step.

Please could someone help me work out what I can try next to get this working as I’m past the point of trying logical things and moving into the realm of just changing random stuff?!

I’ve resolved this by running an initial curl command via SSH to retrieve the token.