Hi!
There is a lot of possible ways, how to retrieve accessToken for API, but its expires after 24 hours.
There is NO any refreshToken functionality exist in JavaScript SDK and documentation.
i checked the documentation and how they work via SDK.
Only "Authorization Code Grant" has permissions to work with Calls (originate, answer, hangup etc)
We are looking for solution, which will not force user to RE-login every day.
Is that possible somehow to make any OAuth for a long time, and still be able to control calls via API?
Since PureCloud does not support refresh tokens, the user must log in again whenever their token expires. If you implement the SAML2 Bearer grant, it is possible to authorize the user without prompting them, though that requires the SAML provider to not prompt the user for authentication. There's an open source example to accompany the docs on that grant type if you're interested in pursuing a SAML integration: https://github.com/MyPureCloud/saml2bearer-oauth-example
I'll need more information to be able to help with that error.
Also, it also generates access_token with maximum 48h lifetime.
Correct. PureCloud OAuth clients can be configured for the access tokens to expire after 0 to 48 hours.
And to make OAuth user should login to Okta…
Correct. When you use a SAML2 Bearer integration, the user must be authenticated with the SAML provider for it to be able to provide a SAML assertion to PureCloud.