# How to correctly setup plugin action code

**URL:** <https://forum.bubble.io/t/how-to-correctly-setup-plugin-action-code/49062>\
**Category:** Plugins\
**Created:** [February 9, 2019, 7:36am UTC](https://forum.bubble.io/t/how-to-correctly-setup-plugin-action-code/49062 "2019-02-09T07:36:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasstyles123](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/lucasstyles123/32/36013_2.png) [@lucasstyles123](https://forum.bubble.io/u/lucasstyles123)\
**Post date:** [February 9, 2019, 7:36am UTC](https://forum.bubble.io/t/how-to-correctly-setup-plugin-action-code/49062/1 "2019-02-09T07:36:37Z")

</div>

I am no json coder, i am trying to make a simple plugin that i will use to randomly generate the name  
I am on to the client side or server side code thing, my issue is

1. I dont know what to run, server side or client, I am pulling data from an api (I got the api call setup)
2. I dont know to to create the action at all

All i want the action to do is preform the api call and fill the selected input in it. but its not a full action, its more of a selected event of an action.  
When random is clicked  
call this api (Heres the result)  
fill input with that result (IDK if thats right or if its fill the input with the api)

> **[Bubble - Plugin Editor](https://bubble.io/plugin_editor?id=1549634551199x330373233772068860&tab=tabs-6)**
>
> Start building plugins for Bubble! You can now extend the platform with API, actions and elements
