use \MusheAbdulHakim\GoHighLevel\GoHighLevel;
$client = GoHighLevel::client($access_token,'2021-07-28');
$user = $client->user()->create($companyId,[
'firstName' => $names[0] ?? '',
'lastName' => $names[1] ?? '',
'email' => $userEmail,
'password' => $userPassword,
'type' => 'account',
'role' => 'admin',
'locationIds' => [$locationId],
'permissions' => json_encode([
"campaignsEnabled" => true,
"campaignsReadOnly" => true,
"contactsEnabled" => true,
"workflowsEnabled" => true,
"workflowsReadOnly" => true,
"triggersEnabled" => true,
"funnelsEnabled" => true,
"websitesEnabled" => true,
"opportunitiesEnabled" => true,
"dashboardStatsEnabled" => true,
"bulkRequestsEnabled" => true,
"appointmentsEnabled" => true,
"reviewsEnabled" => true,
"onlineListingsEnabled" => true,
"phoneCallEnabled" => true,
"conversationsEnabled" => true,
"assignedDataOnly" => true,
"adwordsReportingEnabled" => true,
"membershipEnabled" => true,
"facebookAdsReportingEnabled" => true,
"attributionsReportingEnabled" => true,
"settingsEnabled" => true,
"tagsEnabled" => true,
"leadValueEnabled" => true,
"marketingEnabled" => true,
"agentReportingEnabled" => true,
"botService" => true,
"socialPlanner" => true,
"bloggingEnabled" => true,
"invoiceEnabled" => true,
"affiliateManagerEnabled" => true,
"contentAiEnabled" => true,
"refundsEnabled" => true,
"recordPaymentEnabled" => true,
"cancelSubscriptionEnabled" => true,
"paymentsEnabled" => true,
"communitiesEnabled" => true,
"exportPaymentsEnabled" => true
]),
]);