- Introduction
- What's New?
- Features
- Upgrading the Design Editor
- Breaking Changes in 6.0
- Getting Started
- Integration with E-commerce
- Integration with Remote Asset Sources
- Printable Files and Proof Images
- Configuring Products
- Creating Product Templates
- User Interface
- Configuration Files
- APIs
- Add-ons
- System Requirements
- Troubleshooting
- Migrating Your Applications
- Licensing
- Copyright Notices
The Google Drive Web Service
Applies to: Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · Archived documentation
Now that you have private keys and tokens providing access to your Google Drive images, you can set up the Google Drive web service (GDWS). This topic helps you configure this service.
Configuring the Google Drive web service
In the GoogleDriveWebService folder, open the Web.config file and find the default AppSettings section:
<configuration>
<appSettings>
<add key="OAuthClientSecretPath" value="..\data\client_secret.json" />
<add key="OAuthClientCredentialPath" value="" />
<add key="ApiSecurityKey" value="UniqueSecurityKey" />
<add key="CorsAllowOriginDomains" value="*" />
<add key="UnsafeHttpWebApiEnabled" value="false" />
<add key="ApplicationDomain" value="" />
<add key="ShowSharedWithMeFiles" value="false" />
</appSettings>
...
</configuration>
Here, you can specify the following parameters for both Google Drive account types:
- CorsAllowOriginDomains restricts the use of your Google Drive images to pages hosted only on listed domains. The "*" default value allows access from any domain.
-
UnsafeHttpWebApiEnabled enables access to the Web API through HTTP. By default, this value is
False, and you can only call the Web API through the secure protocol (HTTPS). -
ApplicationDomain specifies a scheme and authority of URL where you run this web service, for example,
"https://h2.customerscanvas.com".
Also, Web.config contains type-specific parameters.
User Accounts
If you have a user account, then you need to specify the following mandatory parameters:
-
OAuthClientSecretPath defines the location of the
client_secret.jsonfile. - OAuthClientCredentialPath defines the location of your token file.
- ApiSecurityKey is a secret key, which you send as X-GoogleDriveAPIKey in request headers to retrieve images.
Service Accounts
If you have a service account, specify the following mandatory parameters:
- ServiceAccountEmail defines the email to generate a token.
- ServiceAccountKeyPath defines the location of your private key in the PKCS #8 format.
- ApiSecurityKey is a secret key, which you send as X-GoogleDriveAPIKey in request headers to generate tokens.
Running the Google Drive web service
To run this service, create a pool with the NetworkService identity and add a website to the Sites list in IIS Manager.
The IIS pool must have Read and Write permissions to the folder where you keep your token file.