get_access_token: Get or store an access token

Description Usage Arguments Value References Examples

View source: R/authentication.R

Description

get_access_token gets an access token for the API. To obtain the client ID and client secret, you need to create a Yelp app. This is free, and takes about 10 minutes. Go to https://www.yelp.com/developers/documentation/v3/authentication for instructions. store_access_token stores the access token as an environment variable.

Usage

1
2
3
get_access_token(client_id, client_secret)

store_access_token(access_token)

Arguments

client_id

A string giving the Client ID.

client_secret

A string giving the client secret.

access_token

A string generated by get_access_token.

Value

get_access_token returns 128 character string giving the access token. store_access_token is invoked for the side-effect of storing the access token in an environment variable.

References

https://www.yelp.com/developers/documentation/v3/authentication

Examples

1
2
3
4
5
## Not run: 
(access_token <- get_access_token())
store_access_token(access_token)

## End(Not run)

richierocks/yelp documentation built on Oct. 17, 2018, 2:21 a.m.