# "The provided OTP is invalid" error occurs when using the compliance API

**URL:** <https://zatca1.discourse.group/t/the-provided-otp-is-invalid-error-occurs-when-using-the-compliance-api/391>\
**Category:** Onboarding, renewal and revocation\
**Created:** [July 28, 2023, 8:07pm UTC](https://zatca1.discourse.group/t/the-provided-otp-is-invalid-error-occurs-when-using-the-compliance-api/391 "2023-07-28T20:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaShalaby](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MaShalaby](https://zatca1.discourse.group/u/MaShalaby)\
**Post date:** [July 28, 2023, 8:07pm UTC](https://zatca1.discourse.group/t/the-provided-otp-is-invalid-error-occurs-when-using-the-compliance-api/391/1 "2023-07-28T20:07:15Z")

</div>

“The provided OTP is invalid” error occurs when using the compliance API.

---

<div class="post-metadata">

**Author:** ![MaShalaby](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MaShalaby](https://zatca1.discourse.group/u/MaShalaby)\
**Post date:** [July 29, 2023, 6:29am UTC](https://zatca1.discourse.group/t/the-provided-otp-is-invalid-error-occurs-when-using-the-compliance-api/391/2 "2023-07-29T06:29:11Z")

</div>

To resolve the error, consider the following factors:

Check that the VAT number in the CSR request is the same VAT number used to request the OTP.

Verify the OTP’s validity as it expires after 1 hour from the time of generation.

---

<div class="post-metadata">

**Author:** ![MaShalaby](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@MaShalaby](https://zatca1.discourse.group/u/MaShalaby)\
**Post date:** [August 2, 2023, 10:21am UTC](https://zatca1.discourse.group/t/the-provided-otp-is-invalid-error-occurs-when-using-the-compliance-api/391/3 "2023-08-02T10:21:37Z")

</div>

Also, make sure to generate the OTP from the correct Portal/environment you want to use.  
If using Simulation APIs, generate the OTP from the Simulation portal.  
If using Fatoora APIs ( Core ), generate the OTP from the Fatoora portal.
