# Error while using GET endpoint

**URL:** <https://community.postman.com/t/error-while-using-get-endpoint/62710>\
**Category:** Help Hub\
**Tags:** authentication, json\
**Created:** [June 27, 2024, 9:27am UTC](https://community.postman.com/t/error-while-using-get-endpoint/62710 "2024-06-27T09:27:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeev-singh1](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@rajeev-singh1](https://community.postman.com/u/rajeev-singh1)\
**Post date:** [June 27, 2024, 9:27am UTC](https://community.postman.com/t/error-while-using-get-endpoint/62710/1 "2024-06-27T09:27:17Z")

</div>

Receiving below error while using GET API

```auto
JSONError: Unexpected token '<' at 1:1 <!DOCTYPE html><html lang="en" class=" ltr " data-doctype="true" dir="ltr" onto ^

```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [June 27, 2024, 9:50am UTC](https://community.postman.com/t/error-while-using-get-endpoint/62710/2 "2024-06-27T09:50:32Z")

</div>

Hey @rajeev-singh1 👋

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.

---

<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:** [June 27, 2024, 9:59am UTC](https://community.postman.com/t/error-while-using-get-endpoint/62710/3 "2024-06-27T09:59:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [July 27, 2024, 10:00am UTC](https://community.postman.com/t/error-while-using-get-endpoint/62710/4 "2024-07-27T10:00:47Z")

</div>

Closed on July 27, 2024, 10:00am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
