httr (version 0.6.1)

jwt_signature: Generate a JWT signature given credentials.

Description

As described in https://developers.google.com/accounts/docs/OAuth2ServiceAccount

Usage

jwt_signature(credentials, scope, duration = 60 * 60)

Arguments

credentials
Parsed contents of the credentials file.
scope
A space-delimited list of the permissions that the application requests.
duration
Duration of token, in seconds.

Examples

Run this code
cred <- jsonlite::fromJSON("~/Desktop/httrtest-45693cbfac92.json")
jwt_signature(cred, "https://www.googleapis.com/auth/userinfo.profile")

Run the code above in your browser using DataCamp Workspace