Passing api key via the url in R

1,208 views
Skip to first unread message

Veeresh Thummadi

unread,
Dec 2, 2015, 4:48:47 PM12/2/15
to Meetup API
Hi 

I am trying to send the api key through the R script. Here is what i wrote. I am getting a connection error. I wrote this script in R. 

library(jsonlite)
data1<- fromJSON("https://api.meetup.com/2/groups?api_token="your_token", flatten = TRUE)

Let  me know how i can pass this api_key in this file?

Thanks
Veeresh

Chris Lewis

unread,
Dec 2, 2015, 4:59:48 PM12/2/15
to meetu...@googlegroups.com
Hi Verresh,

I don't know R but, as pasted, there are too many quotes. It would be something like:

fromJSON("https://api.meetup.com/2/groups?api_token=your_token", flatten = TRUE)

If that doesn't help perhaps someone familiar with R can step in. Also, sharing your error message could help.

--
--
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.

Veeresh Thummadi

unread,
Dec 4, 2015, 4:25:58 PM12/4/15
to Meetup API
I removed the quotes and tried with access_token or api_token and I am getting this error. 

Error in open.connection(con, "rb") : HTTP error 401.

Doug Tangren

unread,
Dec 21, 2015, 12:06:29 AM12/21/15
to meetu...@googlegroups.com
On Thu, Dec 3, 2015 at 8:49 AM, Veeresh Thummadi <vthu...@gmail.com> wrote:
I removed the quotes and tried with access_token or api_token and I am getting this error. 

Hi Veeresh,

api_token is not a recognized authentication credential parameter name. access_token is if you are using oauth2. This page should help document which parameters are expected to produce sets of oauth credentials http://www.meetup.com/meetup_api/auth/

Are you by any chance trying to use an api key from this page https://secure.meetup.com/meetup_api/key/ to authenticate your request? If so, the expected name of the request parameter is "key". 

You can not substitute an api "key" for an "access_token" value and visa versa. Also, note that access_tokens are subject to expiration and need to be periodically refreshed.

Let me know if that helps.
Reply all
Reply to author
Forward
0 new messages