Skip to content

Commit b50089a

Browse files
authored
Merge pull request #16 from XeroAPI/sid-development
Update to add Assets, Identity and Project example calls
2 parents 0b2f5dd + 7ab3ef9 commit b50089a

File tree

6 files changed

+956
-233
lines changed

6 files changed

+956
-233
lines changed

authorization.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// If we don't have an authorization code then get one
2727
if (!isset($_GET['code'])) {
2828
$options = [
29-
'scope' => ['openid email profile offline_access accounting.settings accounting.transactions accounting.contacts accounting.journals.read accounting.reports.read accounting.attachments']
29+
'scope' => ['openid email profile offline_access assets projects accounting.settings accounting.transactions accounting.contacts accounting.journals.read accounting.reports.read accounting.attachments']
3030
];
3131

3232
// Fetch the authorization URL from the provider; this returns the urlAuthorize option and generates and applies any necessary parameters (e.g. state).

callback.php

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
echo $jwt->getGivenName();
4646

4747
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( (string)$accessToken->getToken() );
48-
$config->setHost("https://api.xero.com");
4948
$identityInstance = new XeroAPI\XeroPHP\Api\IdentityApi(
5049
new GuzzleHttp\Client(),
5150
$config

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Xero oAuth2 app for PHP",
44
"type": "project",
55
"require": {
6-
"xeroapi/xero-php-oauth2": "1.2.0",
6+
"xeroapi/xero-php-oauth2": "1.4.0",
77
"monolog/monolog": "1.0",
88
"vlucas/phpdotenv": "^4.1"
99
},

0 commit comments

Comments
 (0)