Download the PHP package vendasta/g-suite without Composer
On this page you can find all versions of the php package vendasta/g-suite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package g-suite
Vendasta Google Workspace PHP SDK
Description
This is Vendasta's official PHP SDK for API integration of Google Workspace.
Requirements
- PHP 5.5 and above or PHP 7.0 and above
- PECL (may be used to install the required PHP extensions)
- Composer
- PHP gmp extension
- OPTIONAL (but recommended): PHP grpc extension
Installation
Install the requirements from above, then:
Authentication
To authenticate your SDK calls, you must provision a service account from within the Vendasta platform. Refer to the service account guide in order to setup authentication.
You must put this file on your server, and set an environment variable to its path:
Client Initialization
It is highly recommended that you use a singleton client instance. Each client initialization will open its own connection, therefore using a singleton results in reusing a connection, saving time and resources.
Set an environment variable:
To instantiate the client:
Notice that the environment will be set to DEMO if it is not specified.
Provisioning a Google Workspace account
Provisioning a new Google Workspace account can be done using the Account Group SDK and Sales Orders SDK. The Account Group SDK is used to create business accounts in Partner Center. Follow the readme for installation and setup. Create is synchronous. It immediately creates the account and returns the account group ID for the business you made (used as the business ID in the other SDKs). After a business is created you can use the Sales Orders SDK to purchase products on that business using the business ID from the Account Group SDK. CreateAndActivateOrder is an asynchronous process which can result in approval or rejection from the vendor. The status of the order can be polled using the GetSalesOrder endpoint given the order ID from CreateAndActivateOrder.
Production App and Add-on IDs
- Google Workspace Business Starter - MP-XBHPSLDBHZ8Q8F57P43DPKL6SPHKHHMS
- Google Workspace Seat - A-PSZPWNCFWM
- Google Workspace Business Standard - MP-BJ37LGNT37SDN6LR7D46MPP7CBG82MN6
- Google Workspace Seat - A-DH5P2QL4MG
- Google Workspace Business Plus - MP-S2RJ778BSJR7KXFSS775BHCX383CJVSV
- Google Workspace Seat - A-3MC43W3SXM
- Google Workspace Enterprise - MP-FCZGBZM4ZNSGV26CCKVB6GM4F8T5Q6HG
- Google Workspace Seat - A-QH5H53VTKQ
- Google Workspace Transfer - MP-LMVNT4HKZCXTVDFMVT62Q6VB3ZJGNQC6
Demo environment App and Add-on IDs
- Google Workspace Business Starter - MP-6XDHVMQ84K4THNNP2Z7W2GC28VLHRC4Q
- Google Workspace Seat - A-JMJX3KJPT5
- Google Workspace Business Standard - MP-GNWSMJS4BJB4Z8RZWZ8SXW6J4HP32KJ3
- Google Workspace Seat - A-JZTKNPKBDL
- Google Workspace Business Plus - MP-8PS55DCP5DKMDPDHHPWSFPD8XCM44324
- Google Workspace Seat - A-XMF5CQJPJQ
- Google Workspace Enterprise - MP-VDNQPHCTCMHVMSNW87R8N3NRTS4HC6LV
- Google Workspace Seat - A-T5LTKP7ZTV
- Google Workspace Transfer - MP-7TMH5K8N7KNNRZ5NC4RNNS2JFK64HMNC
Deprovision an account
How to use this SDK
Getting domain information
To get the information for a domain including the TXT record and status:
Reducing seats
To reduce seats on a subscription list subscriptions on a domain and then calling the ChangeSeats endpoint with a subscription ID. This page can be referenced to determine which SKU ID you would like to change seats for if there is more than one subscription on the domain.
Disabling SSO
SSO is turned on by default. To toggle it off:
All versions of g-suite with dependencies
guzzlehttp/guzzle Version ^6.3
mdanter/ecc Version ^0.5.0
google/protobuf Version ^3.6.0
vendasta/vax Version ^1.2.0