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.