auth_client_auth_request | R Documentation |
lastfmr implements the desktop application authentication method specified in the API documentation.
auth_client_auth_request(req, auth_client = lastfm_auth_client(), .sign = TRUE) lastfm_auth(.skip_auth = FALSE, .auth = "default") fetch_request_token(auth_client) request_user_auth(request_token, auth_client) fetch_auth_token(request_token, auth_client)
.skip_auth |
Whether to skip the user authorization request, FALSE by default. |
.auth |
Name of authentication identity as a string, defaults to |
request_token |
String containing the request token obtained with |
fetch_request_token()
and fetch_auth_token()
return strings
The authentication workflow is execute by a call to lastfm_auth()
which invokes
the full workflow:
fetch_request_token()
creates a request token for the specific API request, this authenticates a
particular API request and lasts for 60 minutes.
request_user_auth()
launches a browser to request end-user authorization
for access to user account data through the browser. The token created in
the first step is provided as part of the user authorization request to
associate the Application API Key with the user account providing
authorization.
fetch_auth_token()
fetches a session token to be used with all
end-user requests. This is done by providing the application API key and
the request token. The endpoint returns an encrypted session token that
can be attached to all user requests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.