With the recent security update for Drive document URLs and resource key https://developers.google.com/drive/api/v3/resource-keys it's not clear how to get the resource key using the API. For instance the create method doesn't return resourceKey, only id :
drive.files.create {
resource: fileMetadata
media: media
fields: 'id,resourceKey,shortcutDetails'
}, (err, body) ->
...