Function __global->refresh_oauth2_token

Definitions

sources/oauth.php

  • Gets the oAuth access token for a particular service by doing a refresh.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$service_name string No No required parameter N/A N/A The name of the service
$trigger_error boolean No No True N/A N/A Whether to throw a software error, on error

Returns

  • Access token (null: none)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Gets the oAuth access token for a particular service by doing a refresh.
 *
 * @param  string $service_name The name of the service
 * @param  boolean $trigger_error Whether to throw a software error, on error
 * @return ?string Access token (null: none)
 */

function refresh_oauth2_token(string $service_name, bool $trigger_error = true) : ?string