Skip to content

Commit

Permalink
Merge pull request #1 from sendynl/update-readme
Browse files Browse the repository at this point in the history
Enhance the documentation regarding token updates
  • Loading branch information
wgriffioen authored Oct 24, 2023
2 parents 5779b3e + 9296093 commit e09b5ca
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ $connection->setOauthClient(true);
$connection->setClientId('your-client-id')
->setClientSecret('your-client-secret')
->setRedirectUrl('your-callback-url');

$tokenUpdateCallback = function (\Sendy\Api\Connection $connection) {
$data = [
'access_token' => $connection->getAccessToken(),
'refresh_token' => $connection->getRefreshToken(),
'token_expires' => $connection->getTokenExpires(),
];

// Use this data to store the tokens in your application
};
->setTokenUpdateCallback(function (\Sendy\Api\Connection $connection) {
$data = [
'access_token' => $connection->getAccessToken(),
'refresh_token' => $connection->getRefreshToken(),
'token_expires' => $connection->getTokenExpires(),
];

// Use this data to store the tokens in your application
});
```

### Endpoints
Expand Down

0 comments on commit e09b5ca

Please sign in to comment.