# Setting token client on creation

**URL:** https://community.particle.io/t/setting-token-client-on-creation/10707
**Category:** Troubleshooting
**Created:** [March 17, 2015, 7:15am UTC](https://community.particle.io/t/setting-token-client-on-creation/10707 "2015-03-17T07:15:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Devin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/devin/32/4796_2.png) [@Devin](https://community.particle.io/u/Devin)
#### Post date: [March 17, 2015, 7:15am UTC](https://community.particle.io/t/setting-token-client-on-creation/10707/1 "2015-03-17T07:15:40Z")

</div>

Does anyone know how to set the client value when creating a token using curl?

Ive tried the post field client and a wild guess of name but that’s not doing the trick.

---

<div class="post-metadata">

### Author: ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)
#### Post date: [March 17, 2015, 7:36am UTC](https://community.particle.io/t/setting-token-client-on-creation/10707/2 "2015-03-17T07:36:41Z")

</div>

It should be this: [https://github.com/spark/spark-cli/blob/abd4cf98ca16af199f7b824cdf066ba8d8357072/lib/ApiClient.js#L154](https://github.com/spark/spark-cli/blob/abd4cf98ca16af199f7b824cdf066ba8d8357072/lib/ApiClient.js#L154)

---

<div class="post-metadata">

### Author: ![Devin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/devin/32/4796_2.png) [@Devin](https://community.particle.io/u/Devin)
#### Post date: [March 17, 2015, 7:41am UTC](https://community.particle.io/t/setting-token-client-on-creation/10707/3 "2015-03-17T07:41:54Z")

</div>

thanks @kennethlimcp, I knew I had seen an example of it somewhere just for the life of me couldn’t remember where

---

<div class="post-metadata">

### Author: ![Devin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/devin/32/4796_2.png) [@Devin](https://community.particle.io/u/Devin)
#### Post date: [March 17, 2015, 7:48am UTC](https://community.particle.io/t/setting-token-client-on-creation/10707/4 "2015-03-17T07:48:03Z")

</div>

Hmm didnt seem to work. just sets the client to **PASSWORD\_ONLY**.

---

<div class="post-metadata">

### Author: ![harrisonhjones](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/harrisonhjones/32/4132_2.png) [@harrisonhjones](https://community.particle.io/u/harrisonhjones)
#### Post date: [March 17, 2015, 6:15pm UTC](https://community.particle.io/t/setting-token-client-on-creation/10707/5 "2015-03-17T18:15:39Z")

</div>

This is an oauth thing. You have to create your own client\_id. I’m working on documenting it and adding it to phpSpark
