Skip to content

Commit e09b5ca

Browse files
authored
Merge pull request #1 from sendynl/update-readme
Enhance the documentation regarding token updates
2 parents 5779b3e + 9296093 commit e09b5ca

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,15 @@ $connection->setOauthClient(true);
8888
$connection->setClientId('your-client-id')
8989
->setClientSecret('your-client-secret')
9090
->setRedirectUrl('your-callback-url');
91-
92-
$tokenUpdateCallback = function (\Sendy\Api\Connection $connection) {
93-
$data = [
94-
'access_token' => $connection->getAccessToken(),
95-
'refresh_token' => $connection->getRefreshToken(),
96-
'token_expires' => $connection->getTokenExpires(),
97-
];
98-
99-
// Use this data to store the tokens in your application
100-
};
91+
->setTokenUpdateCallback(function (\Sendy\Api\Connection $connection) {
92+
$data = [
93+
'access_token' => $connection->getAccessToken(),
94+
'refresh_token' => $connection->getRefreshToken(),
95+
'token_expires' => $connection->getTokenExpires(),
96+
];
97+
98+
// Use this data to store the tokens in your application
99+
});
101100
```
102101

103102
### Endpoints

0 commit comments

Comments
 (0)