I've created an app on Twitter and obtained my API key and secret API key and gone through the steps to create a token in rstudio. Everything seems like it works and I have a token loaded in my environment, yet when I try to use the search_tweets() function I get an error that my token is invalid or expired. What am I missing?
Have you tested out your token with any other functions? If you've already created the token, you need to run get_token() to authorize in subsequent sessions (see the last section in the rtweet docs on obtaining and using access tokens).
You could also try another one of the authentication methods described in that same vignette I linked to above.