diff --git a/functions/Connect-.ps1 b/functions/Connect-.ps1 index bfe33cd..77d2681 100644 --- a/functions/Connect-.ps1 +++ b/functions/Connect-.ps1 @@ -26,11 +26,12 @@ function Connect- { [String] $Username, - # Zendesk API key retrieved from https://.zendesk.com/agent/admin/api/settings + # Zendesk API token retrieved from https://.zendesk.com/agent/admin/api/settings [Parameter(Mandatory = $true)] + [Alias('ApiKey')] [ValidateNotNullOrEmpty()] [SecureString] - $ApiKey + $ApiToken ) $Script:Context = Get-Connection @PSBoundParameters diff --git a/functions/Get-Connection.ps1 b/functions/Get-Connection.ps1 index 2bd5845..4577791 100644 --- a/functions/Get-Connection.ps1 +++ b/functions/Get-Connection.ps1 @@ -25,17 +25,18 @@ function Get-Connection { [String] $Username, - # Zendesk API key retrieved from https://.zendesk.com/agent/admin/api/settings + # Zendesk API token retrieved from https://.zendesk.com/agent/admin/api/settings [Parameter(Mandatory = $true)] + [Alias('ApiKey')] [ValidateNotNullOrEmpty()] [SecureString] - $ApiKey + $ApiToken ) $context = [PSCustomObject]@{ Organization = $Organization BaseUrl = "https://$Organization.zendesk.com" - Credential = [System.Management.Automation.PSCredential]::New("$Username/token", $ApiKey) + Credential = [System.Management.Automation.PSCredential]::New("$Username/token", $ApiToken) User = $null }