<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://all.docs.genesys.com/index.php?action=history&amp;feed=atom&amp;title=PEC-CAB%2FCurrent%2FCABPEGuide%2FProvisionAPIKey</id>
	<title>PEC-CAB/Current/CABPEGuide/ProvisionAPIKey - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://all.docs.genesys.com/index.php?action=history&amp;feed=atom&amp;title=PEC-CAB%2FCurrent%2FCABPEGuide%2FProvisionAPIKey"/>
	<link rel="alternate" type="text/html" href="https://all.docs.genesys.com/index.php?title=PEC-CAB/Current/CABPEGuide/ProvisionAPIKey&amp;action=history"/>
	<updated>2026-04-23T21:07:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://all.docs.genesys.com/index.php?title=PEC-CAB/Current/CABPEGuide/ProvisionAPIKey&amp;diff=129554&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot;{{Article |Standalone=No |DisplayName=Provision an API key for GES |TocName=Provision an API key for GES |Context=Use the Environment Service API to assign API keys to a speci...&quot;</title>
		<link rel="alternate" type="text/html" href="https://all.docs.genesys.com/index.php?title=PEC-CAB/Current/CABPEGuide/ProvisionAPIKey&amp;diff=129554&amp;oldid=prev"/>
		<updated>2022-09-30T19:45:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Article |Standalone=No |DisplayName=Provision an API key for GES |TocName=Provision an API key for GES |Context=Use the Environment Service API to assign API keys to a speci...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Article&lt;br /&gt;
|Standalone=No&lt;br /&gt;
|DisplayName=Provision an API key for GES&lt;br /&gt;
|TocName=Provision an API key for GES&lt;br /&gt;
|Context=Use the Environment Service API to assign API keys to a specific contact center and to validate that API keys were successfully assigned to the correct contact center.&lt;br /&gt;
|ComingSoon=No&lt;br /&gt;
|Section={{Section&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=If you plan to work with the Genesys Engagement Service (GES) APIs, then you must first provision an API key. An API key is a unique identifier for an application within a specific contact center. Genesys uses your GES API key to associate a Callback API request with your tenant. If an API key has not been provisioned for GES, then you cannot use the GES APIs. On the other hand, if you use basic in-queue callbacks only, you do not need to provision the API key. &lt;br /&gt;
&lt;br /&gt;
The contact center-to-API key relationship is one-to-many. That is, one contact center can have many API keys assigned to it. An API key can be assigned to only one contact center.&lt;br /&gt;
&lt;br /&gt;
To provision an API key for GES, you use the Environment Service API in the '''gauth''' namespace. For information about Genesys Authentication, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Overview|display text=About Genesys Authentication}}.&lt;br /&gt;
&lt;br /&gt;
All operations supported by the Environment Service API require authenticated access. You'll need client credentials and an authentication token to add an API key to the Environment Service. The token is sent with the request to the Environment Service to store the API key. For information, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Provision|anchor=CreateToken|display text=Create an authentication token}}.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=What you'll need to do to provision an API key&lt;br /&gt;
|anchor=TaskSummary&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=To provision an API key for GES, you'll do the following:&lt;br /&gt;
&lt;br /&gt;
*Create an API key.&amp;lt;br /&amp;gt;The API key must be unique. You decide what you want to use for a key, but Genesys recommends that you generate a UUIDv4 and use that as your API key for GES.&lt;br /&gt;
*{{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=GETApprCCID|display text=Find the contact center ID (CCID)}} for the contact center to which you'll assign the API key.&lt;br /&gt;
*{{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=AssignAPIKey|display text=Assign the API key}} to the contact center.&lt;br /&gt;
*{{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=ValidateAPIKey|display text=Validate the API key}}. You can use a GET request to check that the API key is assigned to the correct CCID. You can also  use the {{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=ValidateAPIKeyUI|display text=Callback UI}} to validate the API key.&lt;br /&gt;
&lt;br /&gt;
If you need to remove an API key from a CCID, see {{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=UnassignAPIKey|display text=Unassign an API key}}.&lt;br /&gt;
&lt;br /&gt;
For more information about using the Environment Service API, including how to change CORS settings, or information about Callback APIs, see {{Link-SomewhereInThisVersion|manual=CABPEGuide|topic=ProvisionAPIKey|anchor=Resources|display text=Additional resources}}.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Get the appropriate contact center ID&lt;br /&gt;
|anchor=GETApprCCID&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=To manage the GES API key, you require the contact center ID (CCID) for the contact center where GES is deployed. Use a GET operation to request the CCID from the appropriate Environment pod. Include the GES Environment node and port information in the request. For example: &amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;GET env:8091/environment/v3/contact-centers&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The API responds with the CCID, Environment ID, domain, and authentication information.&lt;br /&gt;
&lt;br /&gt;
If you don't have a CCID already assigned to the appropriate contact center, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Provision|anchor=AddCC|display text=Add a contact center}}.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Assigning an API key to a contact center&lt;br /&gt;
|anchor=AssignAPIKey&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=You create your own API key. Use an API key that is random and unique. The assignment of an API key fails if the API key already exists or is assigned to another contact center. Genesys recommends that you generate a UUIDv4 and use that as your API key. &lt;br /&gt;
&lt;br /&gt;
Remember that all operations supported by the Environment Service API require authenticated access. You'll need client credentials and an authentication token to assign the API key to a contact center. The token is sent with the request to the Environment Service to store the API key. For information, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Provision|anchor=CreateToken|display text=Create an authentication token}}. &lt;br /&gt;
&lt;br /&gt;
To provision and associate an API key with your contact center, use the following POST request:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
POST .../environment/v3/contact-centers/{ccid}/api-keys&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Include the API key attribute (&amp;lt;tt&amp;gt;apiKey&amp;lt;/tt&amp;gt;) in the body of the POST API request. For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
curl --location --request POST 'env:8091/environment/v3/contact-centers/ed4c03f3-6275-4419-8b2b-11d14af10655/api-keys' \&lt;br /&gt;
 &lt;br /&gt;
--header 'Content-Type: application/json' \&lt;br /&gt;
--header 'Authorization: Bearer f3aa2109-8889-4182-b2b7-d86917c53e4e' \ &lt;br /&gt;
--data-raw '{&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
       &amp;quot;apiKey&amp;quot; : &amp;quot;78fd8f03-d9d0-4140-8aae-09f3f15d1392&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you've assigned the API key to the contact center, the key is used as the value for &amp;lt;tt&amp;gt;x-api-key&amp;lt;/tt&amp;gt; in the header of every request to the GES APIs.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Validating that the API key is correctly assigned to a contact center&lt;br /&gt;
|anchor=ValidateAPIKey&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=To verify that the API key for GES was successfully assigned to the contact center where GES is deployed, use the API key that you created for GES to look up the CCID. You can also use the CCID to retrieve the collection of API keys assigned to the contact center; ensure the API key for GES is included. &lt;br /&gt;
&lt;br /&gt;
To find the contact center to which a specific API key is assigned, use the following GET request. The API key must be URL-encoded. For information, see [https://developers.google.com/maps/url-encoding Google URL-Encoding].&lt;br /&gt;
&amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;GET .../environment/v3/contact-centers/api-key/&amp;lt;url-encoded api key value&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The API response provides the CCID, Environment ID, domain, and authentication information.&lt;br /&gt;
&lt;br /&gt;
To retrieve the list of API keys assigned to a contact center, use the following GET request:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;GET .../environment/v3/contact-centers/{ccid}/api-keys&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The API returns the list of API keys assigned to the CCID.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Validating an API key using the Callback UI&lt;br /&gt;
|anchor=ValidateAPIKeyUI&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=For information about validating an API key using the Callback UI, see {{Link-AnywhereElse|product=PEC-CAB|version=Current|manual=Administrator|topic=CallbackDeveloper|anchor=validate_api_key|display text=Validating your API key}} in the ''Callback Administrator's Guide''.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Unassigning an API key&lt;br /&gt;
|anchor=UnassignAPIKey&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=To remove an API key from a contact center, use the following DELETE operation, where {apiKey} is the API key you want to remove from the contact center: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;yaml&amp;quot;&amp;gt;&lt;br /&gt;
DELETE .../environment/v3/contact-centers/{ccid}/api-keys/{apiKey}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|Status=No&lt;br /&gt;
}}{{Section&lt;br /&gt;
|sectionHeading=Additional resources&lt;br /&gt;
|anchor=Resources&lt;br /&gt;
|alignment=Vertical&lt;br /&gt;
|structuredtext=When provisioning an API key for GES or working with GES APIs, you might find the following resources helpful:&lt;br /&gt;
&lt;br /&gt;
*For detailed information about using the Genesys Authentication Environment Service API to create authentication tokens or to add a Genesys tenant, contact center, or data center, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Provision|display text=Provision Genesys Authentication}}.&lt;br /&gt;
*The documentation for GES REST APIs is available through the [https://developer.genesyscloud.com/reference/engagement/ Genesys Multicloud CX Developer Center]. The GES/Callback APIs are:&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Callbacks/index.html Callbacks] — Create, retrieve, cancel callbacks.&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Estimated-Wait-Time/index.html Estimated Wait Time] —Retrieve Estimated Wait Time.&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Availability/index.html Availability] — Retrieve time slots for a callback, matching Office Hours.&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Call-In/index.html Call In] — Request the phone number to call in.&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Queue-Status/index.html Queue Status] — Retrieve information about a queue's readiness to accept callbacks.&lt;br /&gt;
**[https://developer.genesyscloud.com/reference/engagement/Statistics/ Statistics] — Provides a proxy to the GWS Statistics API. To use the Callback Statistics API, you must first [https://all.docs.genesys.com/PEC-CAB/Current/Administrator/CallbackStatisticsAPI register your GWS credentials] in the Callback UI ('''Developer''' &amp;gt; '''Credential Management''' &amp;gt; '''GWS Credentials''' tab).&lt;br /&gt;
&lt;br /&gt;
*For web-based callbacks, you might need to configure or update CORS domains. For information, see {{Link-AnywhereElse|product=AUTH|version=Current|manual=AuthPEGuide|topic=Provision|anchor=UpdateCORS|display text=Update CORS settings}}.&lt;br /&gt;
|Status=No&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
		
	</entry>
</feed>