I am trying to use the meetupr package from this repository: https://github.com/rladies/meetupr. According to the ReadMe, a token is created the first time when running a meetupr function. In my case the Meetup server had problems at the time when I used the package, which is why I could not log in and generate the token. Now, when trying to run meetupr I get the error
Cannot read token from alleged .rds file:
~/.local/share/meetupr/meetupr-token.rds
The file mentioned in this error message is empty.
This error arises for example when I run:
library(meetupr)
find_groups(text = "book")
OS: Ubuntu 20.04
R: version 4.1.2
Browser: Firefox 94.0
I already tried to remove.packages("meetupr")
and install.packages("meetupr")
again, but that didn't help.
How do I re-run the authentification function to create a token in this file?
Deleting the .rds
file located in the folder that is returned by the following command should help:
rappdirs::user_data_dir("meetupr", "meetupr")
If you don’t tweak anything, the first time you run a meetupr function, you’ll be prompted to go into your browser and a token will be created. It will be saved to disk in an app directory as determined by rappdirs::user_data_dir("meetupr", "meetupr")
(Source: meetupr README)
So I think what happened is that while the authentication was not successful, the file was still created but without a valid token inside. meetupr
thinks that if you have the file, you have a valid token.
Deleting the file should re-trigger the oauth flow.