Error while using GET endpoint

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 :wave:

Welcome to the Postman Community! :postman:

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.