61 if (!is_null($this->anonymousIdProvider)) {
62 $data[
'anonymous_id'] = $this->anonymousIdProvider->getAnonymousId();
65 'form_params' => $data,
66 'auth' => [$this->credentials->getClientId(), $this->credentials->getClientSecret()],
69 $result = $this->client->post($this->accessTokenUrl, $options);
72 $body = json_decode((
string) $result->getBody(),
true);
75 (
string) $body[self::ACCESS_TOKEN],
76 (
int) $body[self::EXPIRES_IN],
77 (
string) $body[self::REFRESH_TOKEN]