Ok, I managed to solve the issue. It's missing in the documentation but it's necessary to set the AppId with setAppId(<BEGINNING_OF_CLIENT_ID>) and the argument should be the beginning of your client id in google cloud console.
function onPickerApiLoad() {
const oauthToken = '<YOUR_OAUTH_TOKEN>'; // Retrieved from backend securely
const picker = new google.picker.PickerBuilder()
.addView(google.picker.ViewId.DOCS)
.setOAuthToken(oauthToken)
.setDeveloperKey('<YOUR_API_KEY>')
.setCallback(pickerCallback)
.setAppId(<BEGINNING_OF_CLIENT_ID>)
.build();
picker.setVisible(true);
}