Pack - Custom Authentication for API

I’m working on a pack for an API integration with another platform my company uses. The API requires a custom token authentication every time the pack runs. I have it set up according to their API Authentication documentation but keep getting and error that the token is invalid even though it is the token that was just generated in the POST request with my login credentials. Sometimes (maybe 10% of the time) it works and will accept the token.

After contacting their support, they said the issue is likely that the IP address used in the POST request and the IP address used in the GET request are different and their system flags that and makes the token invalid. Any ideas on a way to make both requests use the same IP address so this error will be fixed? Or any other ideas on what the issue may be?

Hi @Caitlyn_Wells - Welcome to the Coda community! Unfortunately there is no way to limit your Pack to use a single IP address for outbound requests. Coda has a pool of IP addresses we use for external traffic, which is a good engineering practice and pretty common in the industry.

If the API you are working with requires a stable IP address then I think the only solution would be for your to create your own proxy server that sits in the middle. It would receive requests from the Pack, send them to the API (on a single IP) and then relay the results back to the Pack. It would be a fair bit more work and some expense, but it should work around their restriction.

Thank you for sharing this! I did some research and found that the proxy server seems to be the only solution. I’m fairly new to pack creation, so this is helpful to know the research led to the right option.

I’ve not dealt with proxy servers much. Do you have any recommendations on how to have the pack send it’s request to the proxy? Currently the pack sends the POST and GET requests to the endpoint for the program’s API. (I also plan to do research into it, but wanted to ask if you have any guiding tips!)

@Caitlyn_Wells Can I ask which API you’re trying to connect to?

@Troy_Larson It is Rent Manager. You can view their page here:

If you build this proxy server from scratch then you can send requests to it in any format you wish, and then just make sure they are the correct format when sending them to the API. I’m not sure if there is an off-the-shelf proxy server you can use, but if so they would likely require a specific format for the requests.

1 Like

Okay, thanks for the info!