# Campaign ID place

**URL:** <https://www.patreondevelopers.com/t/campaign-id-place/68>\
**Category:** Friendly Help\
**Created:** [October 27, 2017, 4:14pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68 "2017-10-27T16:14:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeaderSoul](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@LeaderSoul](https://www.patreondevelopers.com/u/LeaderSoul)\
**Post date:** [October 27, 2017, 4:14pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/1 "2017-10-27T16:14:51Z")

</div>

Hello  
I don’t find my campaign ID and I need to a discord chat bot. Can someone write a tutorial where can I find?  
If only with programming can I get then please give me a source, because I am no professional programmer. Thank you. 🙂

UPDATE: OK, it’s nothing. I used this: [https://github.com/Patreon/patreon-php/blob/master/examples/patron-list.php](https://github.com/Patreon/patreon-php/blob/master/examples/patron-list.php) and put campaign\_id in echo.

---

<div class="post-metadata">

**Author:** ![seriallos](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/seriallos/32/25_2.png) [@seriallos](https://www.patreondevelopers.com/u/seriallos)\
**Post date:** [October 27, 2017, 4:48pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/2 "2017-10-27T16:48:41Z")

</div>

Other quick way is to load your campaign in a web browser, View Source, and search for “campaign”. It looks like there is currently some JS pre-populated on the page that includes some API call responses which will have the campaign ID

---

<div class="post-metadata">

**Author:** ![LeaderSoul](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@LeaderSoul](https://www.patreondevelopers.com/u/LeaderSoul)\
**Post date:** [October 27, 2017, 5:17pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/3 "2017-10-27T17:17:07Z")

</div>

Lol, it works. 😃 Thank you. 🙂

---

<div class="post-metadata">

**Author:** ![LordHarvie](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@LordHarvie](https://www.patreondevelopers.com/u/LordHarvie)\
**Post date:** [November 7, 2017, 10:23pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/4 "2017-11-07T22:23:27Z")

</div>

Or, if you have Chrome or Firefox (and possibly others, Edge no longer works), you can get your campaign id by going to your Patreon page (ex, [http://www.patreon.com/patronizer](http://www.patreon.com/patronizer)), and then paste the following into your address bar:

```
javascript:prompt('Campaign ID',window.patreon.bootstrap.creator.data.id);

```

That will pop up a prompt that has your campaign ID highlighted and ready to be copied. 😃

**_Make sure that what you paste in the address bar is preceded by `javascript:`, otherwise it won’t work. Both Chrome and Firefox will remove the javascript protocol when you paste the above into your address bar._**

---

<div class="post-metadata">

**Author:** ![LeaderSoul](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@LeaderSoul](https://www.patreondevelopers.com/u/LeaderSoul)\
**Post date:** [November 7, 2017, 10:55pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/5 "2017-11-07T22:55:07Z")

</div>

I like this solution also. 😃 Thank you that you shared your method. 🙂

---

<div class="post-metadata">

**Author:** ![LiraNuna](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/liranuna/32/9_2.png) [@LiraNuna](https://www.patreondevelopers.com/u/LiraNuna)\
**Post date:** [November 7, 2017, 11:00pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/6 "2017-11-07T23:00:13Z")

</div>

The best way to do it using the API is to use the endpoint `/oauth2/api/current_user/campaigns`, which will give you the campaign resource along with its ID under `data.id`

---

<div class="post-metadata">

**Author:** ![guanoman](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/guanoman/32/2561_2.png) [@guanoman](https://www.patreondevelopers.com/u/guanoman)\
**Post date:** [February 19, 2024, 12:53pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/7 "2024-02-19T12:53:01Z")

</div>

To do the same with the actually latest version of Patreon (as of 2024. 02.), the campaign id can be accessed through:

```auto
window.patreon.bootstrap.campaign.data.id

```

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [February 20, 2024, 10:54pm UTC](https://www.patreondevelopers.com/t/campaign-id-place/68/8 "2024-02-20T22:54:46Z")

</div>

v1 is deprecated, therefore avoid using /oauth2/api/current\_user/campaigns

Use /oauth2/v2/campaigns instead.
