# Invalid client credentials using REST API

**URL:** <https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803>\
**Category:** Pydio 8\
**Created:** [November 6, 2018, 5:23pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803 "2018-11-06T17:23:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yamilquery](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/yamilquery/32/593_2.png) [@Yamilquery](https://forum.pydio.com/u/Yamilquery)\
**Post date:** [November 6, 2018, 5:23pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/1 "2018-11-06T17:23:31Z")

</div>

Hi guys,

We have an issue to get a token with auth.

```
curl -X POST 'http://localhost:8080/auth/dex/token' \
-u xxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxx \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=password&username=yamil&password=password&scope=email%20profile%20pydio&nonce=nonce'

```

We get this response:

`{"error":"invalid_client","error_description":"Invalid client credentials."}`

And we don’t know if the API Token and API Secret that we are using are corrects?

---

<div class="post-metadata">

**Author:** ![Yamilquery](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/yamilquery/32/593_2.png) [@Yamilquery](https://forum.pydio.com/u/Yamilquery)\
**Post date:** [November 6, 2018, 11:25pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/2 "2018-11-06T23:25:19Z")

</div>

I resolved with:

`cells-enterprise config list`

Then, rather than use the API Key and API Secret from my [pydio.com](http://pydio.com) account, I use the ID and the Secret showed above.

In the documentation specs don’t tell us how to get this values, Pydio team should update the documentation.

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [November 9, 2018, 8:37am UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/3 "2018-11-09T08:37:49Z")

</div>

Hi,  
could you show me this part of the documentation, i will update it.

---

<div class="post-metadata">

**Author:** ![Yamilquery](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/yamilquery/32/593_2.png) [@Yamilquery](https://forum.pydio.com/u/Yamilquery)\
**Post date:** [November 9, 2018, 3:57pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/4 "2018-11-09T15:57:25Z")

</div>

Sure. [https://pydio.com/en/docs/cells/v1/using-rest-api](https://pydio.com/en/docs/cells/v1/using-rest-api)

In the section:

> The API\_KEY and API\_SECRET are required to perform any request. They can be found in " **Configs Backend**" in the admin settings.

It should be:

> The API\_KEY and API\_SECRET are required to perform any request. They can be found using the command `cells-enterprise config list`.  
> You should use Id for the API\_KEY and Secret for API\_SECRET under the pydio.grpc.auth service section.

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [November 9, 2018, 4:25pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/5 "2018-11-09T16:25:07Z")

</div>

I will update this section asap.

---

<div class="post-metadata">

**Author:** ![IanPhilips](https://avatars.discourse-cdn.com/v4/letter/i/919ad9/32.png) [@IanPhilips](https://forum.pydio.com/u/IanPhilips)\
**Post date:** [November 27, 2018, 7:47pm UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/6 "2018-11-27T19:47:08Z")

</div>

Could you update this in the cells home edition as well? It still says

> The API\_KEY and API\_SECRET are required to perform any request. They can be found in " **Configs Backend**" in the admin settings.

but I had to use cells-front as the key and the api secret listed in `./cells config list`

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [December 3, 2018, 10:57am UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/7 "2018-12-03T10:57:18Z")

</div>

Hi,  
sorry i actually forgot to update the site, i pushed the modification a while ago on github but i forgot to update the site itself (repull the updated repo), will do that right now.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [May 16, 2023, 10:31am UTC](https://forum.pydio.com/t/invalid-client-credentials-using-rest-api/1803/8 "2023-05-16T10:31:10Z")

</div>

Closed on May 16, 2023, 10:31am UTC

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