baAuthentication: This generates the accessToken using a refresh token or...

Description Usage Arguments Value Author(s) References Examples

Description

This function starts the authentication process with Microsoft Bing. If the user is initiating it for the first time, this function needs user interaction.

Assign the credentials <- baAuthentication(credentials). This updates the access token in the credentials.

Usage

1
baAuthentication(credentials = credentials)

Arguments

credentials

All the credentials related paramters are put in a list named - 'credentials' as shown below. ##Not run credentials <- list( client_id = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", client_secret = "XXXXXXXXXXXXXXX", username = "abc@abc.com", password = "***********", developer_token = "XXXXXXXXXXXXXXXXX", customer_id = "XXXXXXXXXX", account_id = "XXXXXXX" ) ##End(Not run)

Value

credentials

The credentials is the list of parameters like client_id, client_secret, username, password, developer_token, customer_id and account_id. The refresh_token generated is saved in the working directory. The access_token is passed as a value in the credentials list itself. Hence it is necessary to assign the output to credentials.

Author(s)

Deepesh Goel

References

Getting Started with Bing API: https://docs.microsoft.com/en-us/bingads/guides/get-started?view=bingads-12

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
	##Not run
	credentials <- list(
	  ###For authorization and access token###
	  client_id = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	  client_secret = "XXXXXXXXXXXXXXX",
	  ###To get data###
	  username = "abc@abc.com",
	  password = "***********",
	  developer_token = "XXXXXXXXXXXXXXXXX",
	  customer_id = "XXXXXXXXXX",
	  account_id = "XXXXXXX"
	)
	credentials <- baAuthentication(credentials)
	##End(Not run)

deepeshgoeliitk/bingAdsR documentation built on May 25, 2019, 3:59 a.m.