myTarAuth: Authentication in 'MyTarget API'

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/myTarAuth.R

Description

Authentication in 'MyTarget API' by Code Grant Schema. For detail you can see https://target.my.com/adv/api-marketing/doc/authorization.

Usage

1
2
3
4
5
6
7
myTarAuth(login              = NULL,
          grant_type         = "client_credentials", 
          client_id          = getOption('rmytarget.client_id'),
          client_secret      = getOption("rmytarget.client_secret"),
          agency_client_name = NULL,
          code_grant         = getOption("rmytarget.code_grant_auth"),
          token_path         = getwd())

Arguments

login

Account name, used in file name if you save credential

grant_type

Your account grant, get one of two values, "client_credentials" or "agency_client_credentials".

client_id

Yoyr client ID.

client_secret

Your client secret

agency_client_name

Your client user name, only for "agency_client_credentials" grant_type

code_grant

logical, Use code gran authorise schema, https://target.my.com/adv/api-marketing/doc/authorization

token_path

Path to directory where you save credential data

Details

You can save your credential in local file, if yoy enter "yes" at answer on "Do you want save API credential in local file?" in R console.

Value

MyTarget Authentication R object.

Author(s)

Alexey Seleznev

See Also

API authorixation documentation by MyTarget - https://target.my.com/adv/api-marketing/doc/authorization

Examples

1
2
3
4
5
6
## Not run: 
# Recomendation auth by code grant schema
myTarAuth(login = "my_account_name")

 
## End(Not run)						  

maraevdima/rmytarget documentation built on May 26, 2019, 6:56 p.m.