Generate Confluence Token
To connect to a Knowledge Hub knowledge base, you must either provide your credentials to NiCE Professional Services or enter them in Knowledge Hub yourself. This page describes how to generate those credentials, also called OAuth tokens. You should treat the OAuth tokens like passwords. Be sure to store them in a secure location. If you lose them, you'll have to regenerate them.
This method is a developer effort. It requires knowledge of Python and Atlassian admin privileges.
Complete each of these tasks in the order given.
Install Python
Complete this task if you don't already have Python installed on your computer.
-
Run the installer. Select the box for Add python.exe to PATH, then click Install Now.
Configure Authentication
Use this method for basic integration with Confluence. To create an API token, do the following:
-
Navigate to the Atlassian account settings
page. -
Select the Security tab.
-
On the API Tokens page, select Create API token.
-
In the Create API token dialog box:
-
Enter a name for the token.
-
Specify the token expiry time.
-
Select Create.
The system generates an API token.
Note: API tokens can be valid for up to one year. Make sure to renew them before they expire to avoid interruptions.
-
-
Copy the token and store it in a secure location.
Note: You won’t be able to view the token again after you close the dialog box.
Configure OAuth Authentication
To set up OAuth authentication, follow these steps to enable safe and limited access to Confluence using a secure login method called OAuth 2.0.
-
Go to the Atlassian Developer Console
and sign in with your Atlassian account. -
Create or select your app:
-
If you do not have an app created:
-
Select Create.
-
From the dropdown menu, choose OAuth 2.0 (3LO) as the app type.
-
Enter a name and description for your app.
-
Select Create to finish.
-
-
If you already have an app:
-
Select the app from the My apps list.
-
-
-
Go to the app’s Overview page, in the left navigation pane, select Permissions.
-
Under Confluence API, select Add, then choose Configure.
-
Enable the required scopes:
-
For Classic scopes, select Edit and enable all read permissions.
-
For Granular scopes, select Edit and enable all read permissions.
-
-
Select Save to apply the scope settings.
-
-
In the left navigation pane, select Authorization.
-
Under OAuth 2.0 (3LO), select Add.
-
In the Callback URL field, enter:
-
https://us-west-2.console.aws.amazon.com/appflow/oauth
-
-
Select Save changes.
-
-
In the left navigation pane, select Settings.
-
Go to the Authentication details section and copy the Client ID and Secret key.
Configure User and Group Access
This section explains how to add users, assign product access, and manage group memberships in the Atlassian Admin Console to ensure proper access to Confluence.
-
To add users:
-
Go to the Atlassian Admin Console
. -
In the left navigation pane, select Directory, then choose Users.
-
Select Invite users.
-
Enter the email addresses of the users you want to invite.
-
Under Product access, select Confluence to grant site access.
-
Select Send invitation.
Note: Users must accept the invitation to activate their accounts.
-
-
After users are added, assign appropriate product roles to control their level of access. To assign product access:
-
In the Users list, select the name of the user.
-
On the user profile page, select the Product access tab.
Note: Ensure Confluence is selected. -
Assign the appropriate role based on the user's responsibilities. For example, user, administrator, and so on.
-
-
To add users to groups
-
In the left navigation pane, select Directory, then choose Groups.
-
Select the group you want to manage.
-
Select Add members.
-
Search for the users by name or email address.
-
Select the users and confirm the addition.
Group-based access simplifies permission management across multiple spaces and products.
-
-
Group memberships help manage permissions and access levels efficiently. Recommended Groups are as follows:
GROUP name
PURPOSE
confluence-admins-servion11 Admin access confluence-user-access-admins-servion11 Manage user access confluence-users-servion11
General user access org-admins Organization-level admin
Generate OAuth Tokens Using Python
Use the Python script from this TXT file to generate authentication tokens for accessing the API. Before running the script, make sure to replace the placeholder values for client_id and client_secret with your actual credentials.
Note: Ensure the Redirect URIs matches the one configured in the Developer Console.
Configure Space-level Permissions in Confluence
Space-level permissions in Confluence allow you to control who can view, edit, or administer content within a specific space. Follow these steps to configure permissions for a space:
-
Log in to your Confluence space using your credentials.
-
In the left navigation pane, locate and click on the space you want to manage.
-
Inside the space, click on the Space Settings.
-
Scroll to the Space Access section and click the Users. This opens the interface where you can add or remove permissions for a user or user group.
-
Click Edit and enable View access.
-
After assigning the appropriate permissions, click the Save.
Access Token Expiration
If your access token has expired, you won’t be able to make API calls. To fix this, go to the AtlassianDeveloper Console
and generate a new token.