I can't upload files to encrypted library by api token

I generated a api token in encrypted library,I hope to upload files to the encrypted library.
But I got Internal error
But I can do that for a unencrypted library

I hope to upload files to an encrypted library by api token, please tell me how to do that.

An error occurred because the password was not set
But it looks like no way to set password by api token call,at least the api documentation doesn’t