# Demo account APIs return Unauthorized despite setting up all scopes

**URL:** <https://stack.deel.com/t/demo-account-apis-return-unauthorized-despite-setting-up-all-scopes/311>\
**Category:** Bug Reports\
**Tags:** api\
**Created:** [December 26, 2024, 9:46pm UTC](https://stack.deel.com/t/demo-account-apis-return-unauthorized-despite-setting-up-all-scopes/311 "2024-12-26T21:46:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stitchflow](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@stitchflow](https://stack.deel.com/u/stitchflow)\
**Post date:** [December 26, 2024, 9:46pm UTC](https://stack.deel.com/t/demo-account-apis-return-unauthorized-despite-setting-up-all-scopes/311/1 "2024-12-26T21:46:14Z")

</div>

**Bug Reporting Template**

- Org name: [sandbox@stitchflow.io](mailto:sandbox@stitchflow.io)
- Detailed description of the issue and where it occurs:

1. Created a token under ` **demo.letsdeel.com** ` with all scopes.
2. Hitting the curl command says `Not Authorized`

```auto
curl -X POST 'https://api.letsdeel.com/scim/v2/Users' -H 'Authorization: Bearer <TOKEN>

```

Returns

```auto
{"errors":[{"message":"Not Authorized"}]}

```

---

<div class="post-metadata">

**Author:** ![guilherme\_deel](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@guilherme\_deel](https://stack.deel.com/u/guilherme_deel)\
**Post date:** [December 27, 2024, 4:51pm UTC](https://stack.deel.com/t/demo-account-apis-return-unauthorized-despite-setting-up-all-scopes/311/2 "2024-12-27T16:51:49Z")

</div>

Hi,

I see you’re trying to hit production based on the provided example ([https://api.letsdeel.com/](https://api.letsdeel.com/)) but your Demo token is only valid for Demo environment ([https://api-sandbox.demo.deel.com/](https://api-sandbox.demo.deel.com/))
