Block/Adminhtml/Studio.php
public function generateToken()
    {
        $adminUser = $this->auth->getUser();
        $refreshToken = $adminUser->getRefreshToken();

        if ($refreshToken) {
            $accessToken = $this->client->getAccessToken(
                $this->configFactory->getTokenUrl(),
                $this->buildUrlParams(
                    $this->helper->encryptor->decrypt($refreshToken)
                )
            );

            if (is_string($accessToken)) {
                return $accessToken;
            }
        }

        return false;
    }
public function generateToken()
    {
        $adminUser = $this->auth->getUser();
        $refreshToken = $adminUser->getRefreshToken();

        if ($refreshToken) {
            $accessToken = $this->client->getAccessToken(
                $this->configFactory->getTokenUrl(),
                $this->buildUrlParams(
                    $this->helper->encryptor->decrypt($refreshToken)
                )
            );

            if (is_string($accessToken)) {
                return $accessToken;
            }
        }

        return false;
    }
public function generateToken ( ) { $ adminUser = $ this -> auth -> getUser ( ) ; $ refreshToken = $ adminUser -> getRefreshToken ( ) ; if ( $ refreshToken ) { $ accessToken = $ this -> client -> getAccessToken ( $ this -> configFactory -> getTokenUrl ( ) , $ this -> buildUrlParams ( $ this -> helper -> encryptor -> decrypt ( $ refreshToken ) ) ) ; if ( is_string ( $ accessToken ) ) { return $ accessToken ; } } return false ; }
Generate new token and connect from the admin.

@return string
Generate new token and connect from the admin .