getCode: Authenticates a Google Analytics.

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

Description

This function launches an URL in a broswer for authentication. Once authenticated, the value after code= appearing in the resulting URL needs to be manually copied and stored for later use. This code will allow you to get a refresh token that can be refreshed until revoked. This should be a one-time process unless code is revoked,lost or expires before used to get a refresh token. If exists, the environmental variable GAR_CLIENT_ID will be used by default.

Usage

1
getCode(client_id)

Arguments

client_id

Client ID found in API Console. String format.

Details

Function opens a webiste URL in a browser for authenication. A code can be retrieved from the redirect URL.

Value

Code is a string to be used in conjunction with gaRefresh() function.

Author(s)

Andrew Geisler

References

https://developers.google.com/analytics/devguides/reporting/core/v3/

See Also

GAR gaRequest getCode getRefresh tokenRefresh getMeta

Examples

1
2
3
getCode(
        client_id="ABCDEFG"
        )

andrewgeisler/GAR documentation built on May 10, 2019, 10:31 a.m.