You are not authorized to use this api endpoint

After Generate a CSR and make a compliance CSID request through ZATCA.

I Want Use the compliance request from onboarding to get a production CSID from ZATCA, using which invoices can be submitted to ZATCA through reporting or clearance APIs.

Problem This Erorr
You are not authorized to use this api endpoint

this error result on get_production_csid
this url
url: https://gw-fatoora.zatca.gov.sa/e-invoicing/core/production/csids
headers: {‘Accept-Version’: ‘V2’, ‘OTP’: ‘12345’, ‘accept’: ‘application/json’, ‘accept-language’: ‘en’}
body: {‘compliance_request_id’: ‘1733642278708’}

Response Text: You are not authorized to use this api endpoint

That is My Problem I Want Know What is problem

Dear @working123

Thanks for reaching out,

To provide comprehensive support as usual, can I kindly ask you to elaborate with the below:
1- Did you successfully onboarding on Simulation Environment?
2- Did you successfully complete all the compliance checks after generating CCSID?
3- What are you using in the Authorization part of the provided URL?

Thanks,
Ibrahem Daoud.

Dear Ibrahem,

Thank you for your response.

  1. Yes, I have successfully onboarded in the Simulation environment, but I still face the same authorization issue when trying to obtain the Production CSID.
  2. I have completed the compliance process and obtained the CCSID.
  3. In the Authorization part, I am currently using Basic Authentication with security_token as the username and secret as the password.
    • Should I use the CCSID as the Bearer Token instead?
    • Or is the security_token the correct value for authentication?

Could you please confirm if any additional configuration is required?

Best regards,
Esmail ALHAIMI

Dear @working123

Thanks for reaching out,

Kindly try to use the Authorization as Basic Auth. Please let me if it will works.

Thanks,
Ibrahem Daoud.