# How do you learn to build Discourse plugins?

**URL:** <https://meta.discourse.org/t/how-do-you-learn-to-build-discourse-plugins/57946>\
**Category:** Development\
**Created:** [February 24, 2017, 3:37pm UTC](https://meta.discourse.org/t/how-do-you-learn-to-build-discourse-plugins/57946 "2017-02-24T15:37:27Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)\
**Post date:** [December 31, 2017, 5:43pm UTC](https://meta.discourse.org/t/how-do-you-learn-to-build-discourse-plugins/57946/14 "2017-12-31T17:43:23Z")

</div>

Is there any indication of what action is performed? When I try it, it POSTs JSON to a URL. The JSON contains information about the entity, but I don’t see how to determine information like whether the user has logged in or out. Maybe it could be done with an extra key in the JSON?

```javascript
    {
        "user": { // the type of event
            // the main payload
        },
        "action": "login" // or logout, create, update, delete
    }

```

(Feel free to move this post if it would fit better somewhere else in the forum.)

---

_[View the full topic](https://meta.discourse.org/t/how-do-you-learn-to-build-discourse-plugins/57946)._
