Skip Navigation
Expand
Knowledge Advanced REST API wrapper
Answer ID 11796   |   Last Review Date 08/10/2023

How do I manage the OKCS user tokens in Customer Portal?

Environment:

Oracle B2C Service Knowledge Advanced
Customer Portal 3.8, 3.9

Issue:

There is a requirement for my Knowledge Advanced enabled site to have customized end user pages using the OKCS REST API.

Resolution:

There is no need to create custom storage and handling methods for the tokens required to access the Knowledge Advanced REST API. Use the makeApiRequest function in the standard Okcs model to make whatever API request you require, and the framework will use the same token(s) for the integration itself and user (if logged in) that are used for standard functionality.

Notes:

For further information on configuring Knowledge Advanced on the Customer Portal, see
Implementing Knowledge Advanced on the Customer Portal.

For code portability between environments, you can construct the API base URLs with the following framework function calls:

RightNow\Utils\Config::getConfig(OKCS_IM_API_URL)
RightNow\Utils\Config::getConfig(OKCS_SRCH_API_URL)