can't get API key working when doing curl from the command-line

284 views
Skip to first unread message

rickm...@gmail.com

unread,
Jun 14, 2016, 4:17:18 PM6/14/16
to Meetup API
I'm just starting out doing web api stuff. But I just can't get my API key to work.

First, I got my API key from https://secure.meetup.com/meetup_api/key/
and did that unlock to reveal my API key. Let's say it is: 123.
My real API key is actually 32 characters long.

Then, I tried a console example from here:


I filled in the group_urlname field with HackerNest ... and got a result
along with this signed URL is:


The sig=8fbe5d77c2261ef60fd78f21da9ad2a43a21e368 isn't my "123" key.
I guess it's some kind of one-off use generated by meetup.com.

I noticed this same URL works on the command line with:

{"results":[{"countr

But then I tried my 123 key and got:

{"details":"The signature you have provided is not valid
 for the requested URL.","code":"invalid_signature",
 "problem":"Bad URL Signature"}

I also tried examples from https://secure.meetup.com/meetup_api like:

$ curl -H "Authorization: Bearer {123}" "https://api.meetup.com/topics?page=1"

and also without the curly braces:

$ curl -H "Authorization: Bearer 123" "https://api.meetup.com/topics?page=1"

But I'm still getting the "Bad URL Signature" error.

So what step did I mess up? I have to be missing something obvious here.

Doug Tangren

unread,
Jun 14, 2016, 4:32:17 PM6/14/16
to meetu...@googlegroups.com
No. I think this is something that can just be improved in the documentation to avoid this kind of confusion in the future.

When you using the api console on the website we generate a signed version of the request for a given set of request parameters that may be used elsewhere without exposing your private authentication credentials. That's the sig appended to the request. Attempts at changing query string parameters will result in the invalid signature error you noticed earlier.

In order to authenticate a given request using your API key you simply need to append the "key" request parameter. 

The Bearer {123} indicates an Authorization header that may be provided with a bearer token. You can obtain these tokens via one of the oauth flows. 

Here's a link to our authentication docs http://www.meetup.com/meetup_api/auth/

Hopefully that cleared some things up for you.




 

--
--
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+...@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+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages