# Problem when i try to go to production

**URL:** <https://zatca1.discourse.group/t/problem-when-i-try-to-go-to-production/3744>\
**Category:** FATOORA portal and Simulation portal\
**Created:** [October 19, 2024, 9:38pm UTC](https://zatca1.discourse.group/t/problem-when-i-try-to-go-to-production/3744 "2024-10-19T21:38:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsynt](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hsynt](https://zatca1.discourse.group/u/hsynt)\
**Post date:** [October 19, 2024, 9:38pm UTC](https://zatca1.discourse.group/t/problem-when-i-try-to-go-to-production/3744/1 "2024-10-19T21:38:04Z")

</div>

Hi  
i have problem when i try to go to production  
i face that error  
The remote server returned an error: (401) Unauthorized.

In simulation everything is ok and i can see MY server information in List page in Zatca

after that i start do same steps in production (starting with Prepare you Config file then Create your Keys (Private key, Public Key) …  
but when i try send first invoice (from 6) i get that error  
The remote server returned an error: (401) Unauthorized

i try also change in Config file  
in (certificateTemplateName = ASN1:PRINTABLESTRING:ZATCA-Code-Signing)  
but still i have same error

---

<div class="post-metadata">

**Author:** ![eCloud](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ecloud/32/629_2.png) [@eCloud](https://zatca1.discourse.group/u/eCloud)\
**Post date:** [October 20, 2024, 3:27am UTC](https://zatca1.discourse.group/t/problem-when-i-try-to-go-to-production/3744/2 "2024-10-20T03:27:53Z")

</div>

hi… @hsynt

Make sure there are no missing steps.

1. Create CSR and Private Key
2. Send CSR to get Compliance CSID
3. Signing Document with X509Certificate from Compliance CSID result
4. Send Signed Document to Compliance Check API. Make sure use BinarySecurityToken and Secret from Compliance CSID result as Basic Authorization.

> [@hsynt](#):
>
> i try also change in Config file  
> in (certificateTemplateName = ASN1:PRINTABLESTRING:ZATCA-Code-Signing)  
> but still i have same error

and yes, you should use ZATCA-Code-Signing Template for production

```auto
[req_ext]
certificateTemplateName = ASN1:PRINTABLESTRING:ZATCA-Code-Signing
subjectAltName = dirName:alt_names

```

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [October 20, 2024, 5:16am UTC](https://zatca1.discourse.group/t/problem-when-i-try-to-go-to-production/3744/3 "2024-10-20T05:16:43Z")

</div>

Morning @hsynt

Thanks for reaching out, Welcome to our community.

Can I kindly ask you what is the API that you use to send the (6 invoices)? and what are the exact data you send in (Body, Headers, and Authorization)?

Thanks,  
Ibrahem Daoud.
