myTarAuth: Authentication in 'MyTarget API'

Description Usage Arguments Value Author(s) See Also Examples

View source: R/myTarAuth.R

Description

Authentication in 'MyTarget API' by Code Grant Schema or other auth schems. For detail you can see documentation.

Usage

1
2
3
4
5
6
7
8
9
myTarAuth(
  login = getOption("rmytarget.login"),
  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 = myTarTokenPath()
)

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". Not use in Code Grant Schema.

client_id

Yoyr client ID. Not use in Code Grant Schema.

client_secret

Your client secret. Not use in Code Grant Schema.

agency_client_name

Your client user name. Only for "agency_client_credentials" grant_type.

code_grant

logical, Use code gran authorise schema, detail

token_path

Path to directory where you save credential data.

Value

No return value, called for side effects

Author(s)

Alexey Seleznev

See Also

API authorization documentation by 'MyTarget'.

Examples

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


## End(Not run)						  

rmytarget documentation built on Oct. 20, 2021, 5:08 p.m.