title: How to get the webViewLink in Google Drive Api v3?
body: <p>I can't figure out where to find webViewLink. According to the documentation (<a href="https://developers.google.com/drive/api/v3/reference/files" rel="nofollow noreferrer">https://developers.google.com/drive/api/v3/reference/files</a>), I should get this parameter when requesting gapi.client.drive.files.list(). But I don't even have a client object! Perhaps my approach was initially not correct. I spied this solution in one article. From the documentation, it is not clear to me how to do this.</p>
  <pre><code>  mounted () {
     const gDrive = document.createElement('script')
      gDrive.setAttribute('type', 'text/javascript')
      gDrive.setAttribute('src', 'https://apis.google.com/js/api.js')
      document.head.appendChild(gDrive)
    },
  
    methods: {
     async pickerDialog () {
        await window.gapi.load('auth2', () =&gt; {
          window.gapi.auth2.authorize(
            {
              client_id: this.clientId,
              scope: this.scope,
              immediate: false
            },
            this.handleAuthResult
          )
        })
  
        window.gapi.load('picker', () =&gt; {
          this.pickerApiLoaded = true
          this.createPicker()
        })
      },
  
      handleAuthResult (authResult) {
        if (authResult &amp;&amp; !authResult.error) {
          this.oauthToken = authResult.access_token
          this.createPicker()
        }
      },
  
      createPicker () {
        if (this.pickerApiLoaded &amp;&amp; this.oauthToken) {
          var picker = new window.google.picker.PickerBuilder()
            .enableFeature(window.google.picker.Feature.MULTISELECT_ENABLED)
            .addView(window.google.picker.ViewId.DOCS)
            .setOAuthToken(this.oauthToken)
            .setDeveloperKey(this.apiKey)
            .setCallback(this.pickerCallback)
            .build()
  
          picker.setVisible(true)
        }
      },
  
      async pickerCallback (data) {
        if (data[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED) {
          const docs = data.docs
          const attachments = []
          for (let i = 0; i &lt; docs.length; i++) {
            const attachment = {}
            attachment._id = docs[i].id
            this.$axios.get(`https://www.googleapis.com/drive/v3/files/${attachment._id}`, {
              headers: {
                Authorization: `Bearer ${this.oauthToken}`
              }
            }).then(res =&gt; console.log(res))
  
            attachment.title = docs[i].name
            attachment.name = docs[i].name + '.' + docs[i].mimeType.split('/')[1]
            attachment.type = 'gDrive'
            attachment.description = 'Shared with GDrive'
            attachment.extension =
              '.' +
              docs[i].mimeType.substring(docs[i].mimeType.lastIndexOf('.') + 1)
            attachment.iconURL = docs[i].iconUrl
            attachment.size = docs[i].sizeBytes
            attachment.user = JSON.parse(localStorage.getItem('user'))
            attachment.thumb = null
            attachment.thumb_list = null
            attachments.push(attachment)
          }
          this.tempAttachments = [...attachments]
        }
        this.oauthToken = null
        this.pickerApiLoaded = false
      }
    }
  }
  </code></pre>