API giving me 401 errors (cloud edition)

Hello dear manager team,

we spent hour trying to find out why we are getting a 401 when trying to post receipts to manager.io

Are there any ip restrictions / security measures in place?

We are on a manager cloud account.

We have a script, on my local machine it works fine, I can create invoices and receipts on our cloud account.

Then when I move the script to https://replit.com/ I start getting 401 errors.

The code is 100% the same, everything that works in my local environment stops working once I run the code in the cloud. Also my dev in Pakistan is getting 401 errors.

But if he sends me his code and I run it on my computer it works fine (get 200 message)

What is causing this?

Please help, without this working our cloud subscription is useless.

Thank you,

Oliver

401 means your login had problems, you should check your credentials.

That is not the problem. The problem is manager is blocking requests from ips from outside of the region the Server ist hosted in. I am in south east Asia, if I access the ip from here it works, if I am in Europe with same code it doesn’t work.

@lubos should be able to answer this.

Just out of curiosity: Why do you use a script to create invoices and receipts?

Because we have 100s of invoices per day. Makes life much easier.

Yes would be great if we could an answer on that, spent hours already on this. Problem is the IP used to connect to our server that is in region South East Asia.

If I use IP from South East Asia, e.g. singapore all works fine. If I use ip from USA it gives me 401. In both cases I am using the same PW, same code.

As I want to host my code on a server that is in the US, I need this to work.

@featurex we do not block any IP address range. So first, we need to figure out whether 401 error is coming from Manager Cloud directly or from somewhere in-between.

Could your developer check HTTP response headers and list all of them? So not just 401 error code but all response headers? That could determine who is responsible.

@lubos yes I will get you that information. But there seems to be something to my theory. Because I moved the region of our cloud manager to US. Now the scripts are working fine that are hosted on replit (which has a US ip).

But now my local machine stopped working because it has an indonesian IP. So somebody must be blocking something. I will get you the HTML header.

PS: if with my local machine i connect to a US vpn it works again.