The error message you provided, “You are not authorized to use this API endpoint,” is a common explanation for a “401 Unauthorized” error. It’s a way for the server to inform the client that they need to provide valid credentials before they can access the requested API.
To resolve this issue, Please check:
1- CSR Request : Double-check that you’ve correctly configured the CSR (Certificate Signing Request) based on the environment you intend to use. Make sure the values you’re entering align with the intended environment as this reference
2- API Endpoint: Ensure that you are using the correct APIs for the correct Environment you want to use.
e.g :
If using Simulation Env, use the Simulation portal to get the OTP and Simulation APIs to get the CCSID and PCCSID as this reference and this reference
3 - Authentication Method: Verify that you are using the correct authentication method (Basic Authentication).
4- Check Credentials: Ensure that you are providing the correct authentication credentials ( username = {binarySecurityToken} and password = {secret}) in the request Auth.
5- Valid Credentials: Ensure that you are using the correct credentials for the correct environment for example you should not use the Simulation Certificates on production and vice versa.
If you have verified all of the above and are still encountering the “401 Unauthorized” error, you may need to provide the support team with the APIs collection and config file used to generate the CSR and sample of submitted invoices.