My web server adds invoices and new clients to invoice ninja. This used to work in Version 4, it now has problems with version 5. I always get a 403 return code. I have changed the java code to make allowances for the security token name (X-API-TOKEN)
The JSON in this request comes from the logs in the java code, so is identical. In the java code I am setting Header values to the values used in the curl.
This code used to work in JAVA for version 4, with the only modifications for the X-API-TOKEN name, and minor changes to the JSON format sent to invoicing. As I mentioned, the JSON sent is identical for both curl and my java program.
I changed the URL to point to webpages on invoiceninja,con and invoicing.co and get back a 403 for any page, even changing the request headers for acceptable content types for webpages. Pointed to other websites I have, and java retrieves the contents of the webpage.
It seems invoicing.co is complaining about something before the request is even passed on.
I have known problems like this when cloudflare is used infront of a website. Are there any other headers required for the request?