Skip to content

Commit a481a6f

Browse files
authored
Merge pull request #635 from akeneo/API-1856-api-documentation
feat(API-1856): PHP Client build by App token
2 parents d91724a + aa5a910 commit a481a6f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

content/php-client/authentication.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
You can be authenticated to the REST API either by providing a username and a password or by providing a token and a refresh token.
44

5+
## By App token
6+
7+
Authenticate with the access token received from an [OAuth authorization](/apps/authentication-and-authorization.html#token-success-response).
8+
9+
```php
10+
<?php
11+
12+
require_once '/vendor/autoload.php';
13+
14+
$clientBuilder = new \Akeneo\Pim\ApiClient\AkeneoPimClientBuilder('http://localhost/');
15+
$client = $clientBuilder->buildAuthenticatedByAppToken('token');
16+
```
17+
518
## By username/password
619

720
You can authenticate to the client with your credentials client id/secret and your user/password:

0 commit comments

Comments
 (0)