My "key" authentication works fine for GET, but not POST

73 views
Skip to first unread message

Jonathan C

unread,
Nov 27, 2017, 11:26:25 AM11/27/17
to Meetup API
I can't see any restrictions in the documentation about authentication methods working for GET but not for POST.

Specifically, if I GET the attendance using GET /:urlname/events/:id/attendance with the "key" parameter set to my API key, I get a valid response (all the attendance of the event).
But if I use POST to try to set an attendance using POST /:urlname/events/:id/attendance also with the "key" parameter set to my API key, it comes back with JSON body:
{"errors":[{"code":"authentication_error","message":"Authenticated member required"}]}

In both GET and POST I am testing just using "curl" on a Linux server, so the format of the underlying HTTP should be fine.

I am an Assistant Organizer in this group, and I can successfully take attendance, etc., through the web.
This is the first POST API that I have tried, but I have used GET APIs for several years without issues.

Jonathan C

unread,
Nov 27, 2017, 2:10:09 PM11/27/17
to Meetup API
It turns out the issue is somewhere in use of "curl" for POST of forms. After I went to pure Perl, using LWP::UserAgent, everything works fine.

Doug Tangren

unread,
Nov 27, 2017, 2:11:44 PM11/27/17
to meetu...@googlegroups.com
On Mon, Nov 27, 2017 at 11:42 AM, Jonathan C <jmcro...@msn.com> wrote:
It turns out the issue is somewhere in use of "curl" for POST of forms. After I went to pure Perl, using LWP::UserAgent, everything works fine.

One common issue with using curl is using -F foo=bar instead of -d "foo=bar". -F sends a different content type than -d. For most API methods only the -d form is supported.
 

--
--
You received this message because you are subscribed to the Google
Groups "Meetup API" group.
To unsubscribe from this group, send email to
meetup-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/meetup-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Meetup API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetup-api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan C

unread,
Nov 27, 2017, 6:51:26 PM11/27/17
to Meetup API
Interesting, because the API help pages all use "-F" in the curl examples.
Reply all
Reply to author
Forward
0 new messages