# Response has an invalid content type

**URL:** <https://community.hubspot.com/t/response-has-an-invalid-content-type/83845>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [June 21, 2023, 2:34pm UTC](https://community.hubspot.com/t/response-has-an-invalid-content-type/83845 "2023-06-21T14:34:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASarna2](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ASarna2](https://community.hubspot.com/u/ASarna2)\
**Post date:** [June 21, 2023, 2:34pm UTC](https://community.hubspot.com/t/response-has-an-invalid-content-type/83845/1 "2023-06-21T14:34:21Z")

</div>

![ASarna2_0-1687357928901.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/9/1947d880ef50928bd6da19d0b2903d3a6ba0f3b4.png)

getting the error for wrong content type

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 22, 2023, 7:56pm UTC](https://community.hubspot.com/t/response-has-an-invalid-content-type/83845/2 "2023-06-22T19:56:21Z")

</div>

Hi, @ASarna2. Thanks for your question.

It sounds like your `Content-Type` header isn’t set to `application/json`. But without further details or code snippets, it’s difficult to provide a more specific solution.

Please share more details about your server setup and the code you’re using to handle requests. Otherwise, it will be challenging or impossible for the community to assist you.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![ASarna2](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ASarna2](https://community.hubspot.com/u/ASarna2)\
**Post date:** [June 23, 2023, 7:14am UTC](https://community.hubspot.com/t/response-has-an-invalid-content-type/83845/3 "2023-06-23T07:14:40Z")

</div>

import React, { useEffect } from ‘react’;

import { useHistory } from “react-router-dom”;

import “./HSAuthSSO.less”;

import { Helmet } from “react-helmet”;

import queryString from “query-string”;

import { getWindowEnv } from “../common/Utils”;

import axios from ‘axios’;

const HSAuthSSO = (props) =\> {

const currParams = queryString.parse(props.location.search);

const { hs\_object\_id } = currParams;

console.log(“currParams..”, currParams);

const response = {

“results”: [{

“objectId”: “101”,

“title”: “Company card”,

“description”: “My Company Card”,

“properties”: [{

“label”: “Successfully display card”,

“dataType”: “STRING”,

“value”: “my card value”

}]

}]

}

return (JSON.stringify(response))

}

export default HSAuthSSO;

///This the code i’m returing to test hard code API response for testing purpose using React js. But the issue persist.

---

<div class="post-metadata">

**Author:** ![ASarna2](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@ASarna2](https://community.hubspot.com/u/ASarna2)\
**Post date:** [July 18, 2023, 3:11pm UTC](https://community.hubspot.com/t/response-has-an-invalid-content-type/83845/4 "2023-07-18T15:11:33Z")

</div>

i need help for CRM UI layout development for my side bar public app (i.e. CRM Card) and how to debug the UI App?
