# How to fix it: JSONError: Unexpected token 'F' at 1:1 Forbidden ^

**URL:** <https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364>\
**Category:** Help Hub\
**Tags:** tests, variables, json\
**Created:** [August 19, 2022, 8:56pm UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364 "2022-08-19T20:56:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![supply-observer-2655](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@supply-observer-2655](https://community.postman.com/u/supply-observer-2655)\
**Post date:** [August 19, 2022, 8:56pm UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364/1 "2022-08-19T20:56:40Z")

</div>

Please help to solve the problem.  
I am trying to do an independent test on editing the article. Created variables for registration and new article.  
But it constantly gives an error: JSONError: Unexpected token ‘F’ at 1:1 Forbidden ^  
I don’t know what else can be fixed.  
All the variables I use are in the screenshots.

 ![Screenshot_10](https://us1.discourse-cdn.com/getpostman/original/2X/6/694dff9ee75539af47412981c9fee74cf6491b11.png)  
 ![Screenshot_11](https://us1.discourse-cdn.com/getpostman/original/2X/2/2eb786550b6d076e7db0f5a2bc50b191ce9c12da.png)  
 ![Screenshot_12](https://us1.discourse-cdn.com/getpostman/original/2X/4/4358a725ddfd3690aebbe528862f7effb06c6dbe.png)

---

<div class="post-metadata">

**Author:** ![anastasiiaka](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@anastasiiaka](https://community.postman.com/u/anastasiiaka)\
**Post date:** [August 23, 2022, 2:26pm UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364/2 "2022-08-23T14:26:41Z")

</div>

Hello, did you find a mistake? I have the same but Error: Unexpected token ‘N’ at 1:1 Not Found ^

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [August 24, 2022, 9:29am UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364/3 "2022-08-24T09:29:57Z")

</div>

I would probably try those post requests separately in a collection before joining them together in a pre-request script.

I suspect the problem is that one of your variables isn’t writing correctly. (Probably the token, as you are getting a forbidden message).

It would be useful to see your console log on what was actually sent. Is the token showing correctly in the request?

---

<div class="post-metadata">

**Author:** ![kashyap9888](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@kashyap9888](https://community.postman.com/u/kashyap9888)\
**Post date:** [May 11, 2023, 4:10am UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364/4 "2023-05-11T04:10:32Z")

</div>

JSONError: Unexpected token ‘F’ at 1:1  
Forbidden  
^  
: i faced the same issue : I was doing post manual basic scripts  
-i just re- run token request then everything worked fine

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/0/d0fc291401d5d13f33e1f4b9f79796eae3b1f1fd.png)

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [May 11, 2023, 10:30am UTC](https://community.postman.com/t/how-to-fix-it-jsonerror-unexpected-token-f-at-1-1-forbidden/38364/5 "2023-05-11T10:30:33Z")

</div>

For anyone else reading this topic, let me explain the error and what is causing it.

> JSONError: Unexpected token ‘F’ at 1:1 Forbidden ^

This is caused by having a JSON parse command somewhere in your script.

pm.response.json() or JSON.parse()

These functions are expecting a JSON format, so whatever they are targeting should either start with a [ for an array, or { for an object (an array is a special type of object, but that is a a conversation for another day).

In the above case, its not returning JSON, but a forbidden error. Therefore the first character which is an ‘F’ in unexpected. You’ll also see errors showing ‘H’ because a HTML response has been returned instead of the expected JSON.
