# Can't DELETE Customer: "Customers are not allowed to access product and organization endpoints"

**URL:** <https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085>\
**Category:** Cloud\
**Created:** [January 15, 2021, 10:06pm UTC](https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085 "2021-01-15T22:06:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OptiBobby](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@OptiBobby](https://community.particle.io/u/OptiBobby)\
**Post date:** [January 15, 2021, 10:06pm UTC](https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085/1 "2021-01-15T22:06:21Z")

</div>

I'm trying to Delete a customer:  
[https://docs.particle.io/reference/device-cloud/api/#delete-a-customer](https://docs.particle.io/reference/device-cloud/api/#delete-a-customer)

But the requests fails with a 400 response:

> {  
> "error": "invalid\_scope",  
> "error\_description": "Customers are not allowed to access product and organization endpoints"  
> }

The access token I was using was my Particle Account's access token I generated using the Particle CLI:

> **[Command Line Interface (CLI) | Reference](https://docs.particle.io/reference/developer-tools/cli/#particle-token-create)**
>
> Command line interface for managing your devices for Windows, Mac OS, and Linux

I suspected I needed to use a Customer Scoped Access Token, and generated one:  
[https://docs.particle.io/reference/device-cloud/api/#generate-a-customer-scoped-access-token](https://docs.particle.io/reference/device-cloud/api/#generate-a-customer-scoped-access-token)

But when I used the resulting access\_token as the Bearer token for my Delete Customer request, I hit the same 400 error "Customers are not allowed to access product and organization endpoints"

What's this error response telling me to change about my request?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [January 16, 2021, 5:38pm UTC](https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085/2 "2021-01-16T17:38:56Z")

</div>

Customers can’t delete themselves. You need to use a product-level token, as described [here](https://github.com/rickkas7/particle_notes/tree/master/authenticating-product-apis#create-a-product-bearer-token).

Did you create one of those (using the product ID and product secret) or one based on username and password, before you tried using a customer token?

---

<div class="post-metadata">

**Author:** ![OptiBobby](https://avatars.discourse-cdn.com/v4/letter/o/74df32/32.png) [@OptiBobby](https://community.particle.io/u/OptiBobby)\
**Post date:** [January 20, 2021, 2:49pm UTC](https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085/3 "2021-01-20T14:49:27Z")

</div>

Thank you Rickkas. I was using the wrong token as the access token for the call. The documentation you linked to in github is very clear and much easier to understand than what’s currently in The Cloud API Reference Documentation for Authentication. Is there any chance the documentation you linked to could replace what’s currently here? [Cloud API | Reference Documentation | Particle](https://docs.particle.io/reference/device-cloud/api/#authentication)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [July 22, 2021, 2:49am UTC](https://community.particle.io/t/cant-delete-customer-customers-are-not-allowed-to-access-product-and-organization-endpoints/59085/4 "2021-07-22T02:49:27Z")

</div>

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