Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ksvirkou-hubspot committed Jun 13, 2024
1 parent 0db9746 commit c1152ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ Please, take a look at our [Sample apps](https://github.com/HubSpot/sample-apps-
### To instantiate API Client using access token use Factory

```php
$hubspot = \HubSpot\Factory::createWithAccessToken('access-token');
$hubspot = \HubSpot\Factory::createWithAccessToken('your-access-token');
```

You'll need to create a [private app](https://developers.hubspot.com/docs/api/private-apps) to get your access token or you can obtain [OAuth2](https://developers.hubspot.com/docs/api/working-with-oauth) access token.

#### To instantiate API Client using developer apikey use Factory

```php
$hubspot = \HubSpot\Factory::createWithDeveloperApiKey('developer-apikey');
$hubspot = \HubSpot\Factory::createWithDeveloperApiKey('your-developer-apikey');
```

#### also you can pass custom client to Factory

```php
$client = new \GuzzleHttp\Client([...]);

$hubspot = \HubSpot\Factory::createWithAccessToken('access-token', $client);
$hubspot = \HubSpot\Factory::createWithAccessToken('your-access-token', $client);
```

#### To change the base path
Expand Down Expand Up @@ -76,7 +76,7 @@ $handlerStack->push(

$client = new \GuzzleHttp\Client(['handler' => $handlerStack]);

$hubspot = \HubSpot\Factory::createWithAccessToken('access-token', $client);
$hubspot = \HubSpot\Factory::createWithAccessToken('your-access-token', $client);
```

#### Get contacts page
Expand Down

0 comments on commit c1152ad

Please sign in to comment.