Skip Navigation
Using transient login for API authentication with custom PHP scripts
Answer ID 12438   |   Last Review Date 09/28/2022

What is transient login and how can it be useful with Connect for PHP scripts?


Connect for PHP API (CPHP)
Oracle B2C Service


Transient login does not try to acquire/create a session Id. When using transient login for API authentication with custom PHP scripts there may be a performance boost with frequent (concurrent) invocations due to less db calls/locks.

If a session ID is not needed there are no negative impacts to using transient login. The CWS/SOAP API uses transient login by default, for example.
An alternative to using transient login for improving the performance of custom PHP scripts in this way is to use session-based authentication. The use case for using session-based authentication is when a caller is going to make multiple calls for the duration of the session. In that flow, the session is established, multiple calls are made over the duration of the session (typically multiple hours) and the session eventually ends. So, if a customer was presenting their own UI, rather than forcing the agent to retype their username and password for each request, the session is used for the subsequent calls. 
Indicate transient login when using the initConnectAPI function for API authentication as in the following example:
initConnectAPI($username, $password, null, RightNow\Connect\v1_3\ConnectAPI::AuthOptTransient);
For further details see the API documentation here ('API access control and authentication' section).


Notify Me
The page will refresh upon submission. Any pending input will be lost.