You are here

public function Api::getToken in Fastly 8.3

Get a single token based on the access_token used in the request..

2 calls to Api::getToken()
Api::validatePurgeToken in src/Api.php
Used to validate an API Token's scope for purging capabilities.
Api::validateTokenServiceAccess in src/Api.php
Used to validate if an Api token has access to a service.

File

src/Api.php, line 172

Class

Api
Fastly API for Drupal.

Namespace

Drupal\fastly

Code

public function getToken() {
  $response = $this
    ->query('/tokens/self');
  return $this
    ->json($response);
}