get_token: Generate access token

Description Usage Arguments Details Value

View source: R/get_token.R

Description

Once the client application receives an authorization code (see 'generate_auth_code()'), it can exchange for an access token. See [possible errors](https://www.zoho.com/creator/help/api/v2/generate-token.html)

Usage

1
get_token(base_url, client_id, client_secret, redirect_url, code)

Arguments

base_url

A url. [The base URL of your Zoho Account](https://accounts.zoho.com/oauth/serverinfo) For example, it's accounts.zoho.com if your account belongs to Zoho's US DC.

client_id

A string. The client credentials that were generated when you registered the [client application](https://www.zoho.com/creator/help/api/v2/register-client.html) @param client_secret A string. The client credentials that were generated when you registered the [client application](https://www.zoho.com/creator/help/api/v2/register-client.html)

redirect_url

A url. One of the authorized redirect URIs that you associated while registering the [client application.](https://www.zoho.com/creator/help/api/v2/register-client.html)

code

The authorization code that was generated upon making the [authorization request](https://www.zoho.com/creator/help/api/v2/authorization-request.html)

Details

*Note*: * An access token is valid for only an hour and can be used only to perform the operations defined by the scopes that were included while making the authorization request. * A refresh token has no expiry. However, it can be revoked. It's purpose is to refresh the access token upon its expiry. * A maximum of five refresh tokens can be generated per minute.

Value

A list with a token and the refresh token that the requesting user will need to access the resources that correspond to the scopes that were included while making the authorization request.


araupontones/zohor documentation built on Dec. 19, 2021, 4:35 a.m.