# Using node.js (discourse-sdk) API when SSO is enabled?

**URL:** <https://meta.discourse.org/t/using-node-js-discourse-sdk-api-when-sso-is-enabled/203378>\
**Category:** Product Support\
**Created:** [September 13, 2021, 10:46am UTC](https://meta.discourse.org/t/using-node-js-discourse-sdk-api-when-sso-is-enabled/203378 "2021-09-13T10:46:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [September 13, 2021, 10:56am UTC](https://meta.discourse.org/t/using-node-js-discourse-sdk-api-when-sso-is-enabled/203378/2 "2021-09-13T10:56:08Z")

</div>

Ah, I think I may have solved my own problem.

I needed to modify the discourse-sdk to include the “Accept” json header in its requests:

```javascript
request.get({
        url: getUrl,
        headers: {
            'Accept': 'application/json'
        },
    },

```

Looks like maybe the discourse-sdk didn’t work in the first place, aside from my SSO complications

---

_[View the full topic](https://meta.discourse.org/t/using-node-js-discourse-sdk-api-when-sso-is-enabled/203378)._
