title: 403 Forbidden - Access to this resource on the server is denied - PHP
body: <p>I am trying to make a POST request. I do it using android but I checked also with Postman and I have the same results.</p>
  <p>I checked similar answers but nothing helped. What drives me crazy is this:</p>
  <p>I get the 403 error when I post a request using this JSON data:</p>
  <pre><code>{
     &quot;exercisesList&quot;:[
        {
           &quot;isFavorite&quot;:0,
           &quot;isLiked&quot;:0,
           &quot;isUploaded&quot;:0,
           &quot;allBookPages&quot;:0,
           &quot;bookID&quot;:&quot;&quot;,
           &quot;bookPages&quot;:&quot;&quot;,
           &quot;data&quot;:&quot;[{\&quot;image\&quot;:\&quot;149951.jpg\&quot;,\&quot;isCorrect\&quot;:1,\&quot;position\&quot;:0,\&quot;text\&quot;:\&quot;\&quot;},{\&quot;image\&quot;:\&quot;2629361.jpg\&quot;,\&quot;isCorrect\&quot;:0,\&quot;position\&quot;:1,\&quot;text\&quot;:\&quot;\&quot;}]&quot;,
           &quot;dateAdded&quot;:&quot;2021-11-01 02:14:06&quot;,
           &quot;endVideoSecond&quot;:0,
           &quot;exerciseID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl21635725646363&quot;,
           &quot;exerciseType&quot;:0,
           &quot;genre&quot;:0,
           &quot;isPublic&quot;:1,
           &quot;isTrue&quot;:-1,
           &quot;language&quot;:17,
           &quot;mainText&quot;:&quot;select only numbers&quot;,
           &quot;maxAge&quot;:2,
           &quot;minAge&quot;:1,
           &quot;startVideoSecond&quot;:0,
           &quot;subtitle&quot;:&quot;&quot;,
           &quot;teacherID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2&quot;,
           &quot;videoDuration&quot;:0,
           &quot;videoID&quot;:&quot;&quot;,
           &quot;videoTitle&quot;:&quot;&quot;
        }
     ],
     &quot;lessonItem&quot;:{
        &quot;dateAdded&quot;:&quot;2021-11-06 11:59:03&quot;,
        &quot;estimatedEnergy&quot;:7,
        &quot;exercises&quot;:&quot;{4OEgiM7NizWGER9v7ttJdUQaUCl21635725646363}&quot;,
        &quot;exercisesTypes&quot;:&quot;{0}&quot;,
        &quot;genre&quot;:3,
        &quot;isPublic&quot;:1,
        &quot;language&quot;:17,
        &quot;lessonID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2133341170864824&quot;,
        &quot;maxAge&quot;:8,
        &quot;minAge&quot;:6,
        &quot;teacherID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2&quot;,
        &quot;title&quot;:&quot;Test lesson 407&quot;,
        &quot;totalExercises&quot;:1,
        &quot;totalUpvotes&quot;:0
     }
  }
  </code></pre>
  <p>But I don't get a 403 error when I post a request with this JSON data:</p>
  <pre><code>{
     &quot;exercisesList&quot;:[
        {
           &quot;isFavorite&quot;:0,
           &quot;isLiked&quot;:0,
           &quot;isUploaded&quot;:0,
           &quot;allBookPages&quot;:0,
           &quot;bookID&quot;:&quot;&quot;,
           &quot;bookPages&quot;:&quot;&quot;,
           &quot;data&quot;:&quot;[{\&quot;correct\&quot;:0,\&quot;text\&quot;:\&quot;one\&quot;},{\&quot;correct\&quot;:1,\&quot;text\&quot;:\&quot;two\&quot;},{\&quot;correct\&quot;:0,\&quot;text\&quot;:\&quot;three\&quot;}]&quot;,
           &quot;dateAdded&quot;:&quot;2021-11-06 12:24:02&quot;,
           &quot;endVideoSecond&quot;:0,
           &quot;exerciseID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl21636194242562&quot;,
           &quot;exerciseType&quot;:2,
           &quot;genre&quot;:0,
           &quot;isPublic&quot;:1,
           &quot;isTrue&quot;:-1,
           &quot;language&quot;:17,
           &quot;mainText&quot;:&quot;test mult&quot;,
           &quot;maxAge&quot;:2,
           &quot;minAge&quot;:1,
           &quot;startVideoSecond&quot;:0,
           &quot;subtitle&quot;:&quot;&quot;,
           &quot;teacherID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2&quot;,
           &quot;videoDuration&quot;:0,
           &quot;videoID&quot;:&quot;&quot;,
           &quot;videoTitle&quot;:&quot;&quot;
        }
     ],
     &quot;lessonItem&quot;:{
        &quot;dateAdded&quot;:&quot;2021-11-06 12:23:28&quot;,
        &quot;estimatedEnergy&quot;:16,
        &quot;exercises&quot;:&quot;{4OEgiM7NizWGER9v7ttJdUQaUCl21636194242562}&quot;,
        &quot;exercisesTypes&quot;:&quot;{2}&quot;,
        &quot;genre&quot;:3,
        &quot;isPublic&quot;:1,
        &quot;language&quot;:17,
        &quot;lessonID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2134805549011328&quot;,
        &quot;maxAge&quot;:8,
        &quot;minAge&quot;:6,
        &quot;teacherID&quot;:&quot;4OEgiM7NizWGER9v7ttJdUQaUCl2&quot;,
        &quot;title&quot;:&quot;Test lesson 410&quot;,
        &quot;totalExercises&quot;:1,
        &quot;totalUpvotes&quot;:0
     }
  }
  </code></pre>
  <p>I have checked the JSONs and are both valid. Also the POST request has the same endpoint and the error occurs before handling the data with PHP code.</p>
  <p>Has anyone faced something similar or has any idea what can be wrong?</p>