Description Usage Arguments Details Author(s) Examples
Authenticate the Orion API.
1 2 | orionOAuth(client.id, client.secret, grant.type = "client_credentials",
save = FALSE)
|
client.id |
Your |
client.secret |
Your |
grant.type |
Currently only supports |
save |
If |
Please see the
official documentation
to apply for the API and
get your client_id
and client_secret
:
api.ori.cmcm.com/doc/#api-Auth-access_token. If the token is stored
(save = TRUE
) then orionOAuth
does not need to be run in
future sessions, see example.
John Coene jcoenep@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
# authenticate
orionOAuth(client.id = 0000,
client.secret = "0x00000000x00x0x000xxx0000x0xx0")
# test
camp_oauth <- listCampaigns()
# authenticate and save
orionOAuth(client.id = 0000,
client.secret = "0x00000000x00x0x000xxx0000x0xx0",
save = TRUE)
# detach and unload package
detach("package:oRion", unload = TRUE)
# no oauth
library(oRion)
camp_noauth <- listCampaigns()
identical(camp_oauth, camp_noauth)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.