Receiving below error while using GET API
JSONError: Unexpected token '<' at 1:1 <!DOCTYPE html><html lang="en" class=" ltr " data-doctype="true" dir="ltr" onto ^
Receiving below error while using GET API
JSONError: Unexpected token '<' at 1:1 <!DOCTYPE html><html lang="en" class=" ltr " data-doctype="true" dir="ltr" onto ^
Hey @rajeev-singh1
Welcome to the Postman Community!
Without any contextual information about what it is that youβre doing and against what API - You wonβt get a solution here.
Can you edit your question to include all the details and not just an error message, please.
Probably because your API is returning an HTML page instead of a JSON response. Therefore when you try to parse the response, it produces the error as it expecting JSON, which doesnβt start with β<β like an HTML page does.
Whether its meant to do that is as Danny said contextual.
What status code is being returned? What are you expecting?
Have a look at the response. What is it showing.
The HTML code may be an error page.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.