Skip to content

Commit 6c59260

Browse files
authored
Update Documentation
1 parent c6b4f32 commit 6c59260

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ subscription:
3535

3636
for Europe the url is: [https://api-console.zoho.eu]
3737

38-
- Create or use an existing "Self Client" application.
39-
- Generate the grant code, with the proper scopes.
38+
- Create or use an existing "Self Client" application. You may need these informations:
39+
- Generate the grant code, with the proper scopes. ***`aaaserver.profile.READ` scope is mandatory***
4040
- Generate the persistence auth token file with the Zoho SDK:
41+
- Client ID: you can find it in the Zoho api developer console
42+
- Client Secret: you can find it in the Zoho api developer console
43+
- Redirect url: this is a dummy url, it's part of the oauth standaard but not actively used
44+
- Current User Email: this is the user email used to create the self client integration (https://accounts.zoho.<domain from were you registered to>/oauth/user/info)
45+
- Org ID: this is your organization ID in your Zoho Desk application: Setup and Configuration -> DEVELOPER SPACE -> API -> Zoho Desk API -> OrgId (Orgnization ID) field value
4146

4247
```php
4348
include __DIR__ . /* Relative path to the vendor autoloader */ '/vendor/autoload.php';
@@ -85,6 +90,30 @@ $configBuilder->setClientId(/* Client ID */)
8590
->setTokenPersistencePath(/* Persistence Path */);
8691
```
8792

93+
You can use the following pre-defined values from the `Metadata` class:
94+
95+
```php
96+
final class Metadata
97+
{
98+
public const API_FIELD_CURRENT_USER_EMAIL = 'currentUserEmail';
99+
public const API_FIELD_BASE_URL = 'apiBaseUrl';
100+
public const API_FIELD_VERSION = 'apiVersion';
101+
public const API_ENDPOINT_US = 'desk.zoho.com/api';
102+
public const API_ENDPOINT_AU = 'desk.zoho.com.au/api';
103+
public const API_ENDPOINT_EU = 'desk.zoho.eu/api';
104+
public const API_ENDPOINT_IN = 'desk.zoho.in/api';
105+
public const API_ENDPOINT_CN = 'desk.zoho.com.cn/api';
106+
public const API_VERSION = 'v1';
107+
public const ACCESS_TYPE = 'offline';
108+
public const ORG_ID = 'orgId';
109+
public const API_ACCOUNTS_US = 'https://accounts.zoho.com';
110+
public const API_ACCOUNTS_AU = 'https://accounts.zoho.com.au';
111+
public const API_ACCOUNTS_EU = 'https://accounts.zoho.eu';
112+
public const API_ACCOUNTS_IN = 'https://accounts.zoho.in';
113+
public const API_ACCOUNTS_CN = 'https://accounts.zoho.com.cn';
114+
}
115+
```
116+
88117
## Documentation
89118

90119
The entry point of the SDK is the gateway facade:
@@ -153,4 +182,4 @@ Raise a new [request](https://github.com/thomas-kl1/php-sdk-zoho-desk/issues) to
153182

154183
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) details.
155184

156-
***That's all folks!***
185+
***That's all folks!***

0 commit comments

Comments
 (0)