Authenticate Upload API using Keycloak access_token

Hi,
I am new to the Nextcloud application. We are using Nextcloud as DAM for one of our application which takes media files from user and store it in the Nextcloud for their reference purpose.
We have configured Keycloak authentication (SSO) using social login app and we are able to login to Nextcloud using Keycloak login configuration.

In our case, we have to upload the files from our application to Nextcloud (in specific folder). For that, we wanted to use the keycloak access token to authenticate (Bearer token) Nextcloud Upload API. But facing Unauthorised (403 error code) while triggering upload API with keycloak access token.

Is there any other way to authenticate Nextcloud API using Keycloak access_token? Kindly recommend us with possible approach and solutions, if any.

Thanks in advance.