Ask a Question
Back to All

Random 403/404 errors when using API through Proxy

Hello there,

I'm having trouble with the documents endpoint of the Personio Recruiting API. I'm receiving random and unpredictable 403 and 404 errors; and occasionally it just works. I'm using an Nginx Reverse Proxy to hide the credentials from the general public. Other than that, the setup is pretty basic.

The 403 error contains the following message:
'xyz' not a valid key=value pair (missing equal-sign) in Authorization header: 'Bearer xyz'.". But the header is set correctly.

This is the configuration of the proxy:

location /documents/upload {
    proxy_pass https://api.personio.de/v1/recruiting/applications/documents;
    proxy_set_header Authorization "Bearer xyz";
    proxy_set_header X-Company-ID 123;
    proxy_hide_header Strict-Transport-Security;
    proxy_hide_header Referrer-Policy;
    proxy_hide_header Content-Security-Policy;

What could be the issue here? Are there general issues with the use of proxies and your API?

Thanks in advance.