# Passing params to delete API method using golang

**URL:** <https://meta.discourse.org/t/passing-params-to-delete-api-method-using-golang/83502>\
**Category:** Development\
**Created:** [March 21, 2018, 6:17pm UTC](https://meta.discourse.org/t/passing-params-to-delete-api-method-using-golang/83502 "2018-03-21T18:17:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![richp10](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richp10/32/104381_2.png) [@richp10](https://meta.discourse.org/u/richp10)\
**Post date:** [March 21, 2018, 9:27pm UTC](https://meta.discourse.org/t/passing-params-to-delete-api-method-using-golang/83502/3 "2018-03-21T21:27:17Z")

</div>

Sometimes I need the obvious pointing out to me! Huge thanks. Next thanks go to the Discourse team - I had not previously found the /logs page in the web interface - amazingly valuable and easier than digging around on the server.

Still not fixed, but at least I am not running blind any more!

The logs suggest I am not correctly submitting the formdata correctly.. This is response with either the json or plain formatted version:

```
Discourse::InvalidParameters (user_id or username must be present)
/var/www/discourse/app/controllers/groups_controller.rb:229:in `remove_member'

/var/www/discourse/app/controllers/groups_controller.rb:229:in `remove_member'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/abstract_controller/base.rb:198:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.9/lib/action_controller/metal/rendering.rb:10:in `process_action'

```

I am not Ruby literate - but one weird thing is that the line 229 in that source file is not in the ‘remove\_member’ function - it is in ‘add\_members’ function.

As I understand it, the data user\_id for this method should be added as form data - that is what the actual discourse app seems to do, but so far I cannot replicate correctly in Go.

---

_[View the full topic](https://meta.discourse.org/t/passing-params-to-delete-api-method-using-golang/83502)._
