title: How to get a recorded wav file using Twilio Java API
body: <p>Could somebody point me, using <strong>Twilio Java API</strong>, NOT! REST requests, how can I get the recorded file (.wav) of a concrete call.</p>
  
  <p>I have read all the related articles to recording (<a href="https://support.twilio.com/hc/en-us/sections/205104748-Recording" rel="nofollow noreferrer">https://support.twilio.com/hc/en-us/sections/205104748-Recording</a>), but none of them shows how to do that with Java API.</p>
  
  <p>I use this code, as an starting point, assuming the CALL_SID is known:</p>
  
  <pre><code>import com.twilio.Twilio;
  import com.twilio.base.ResourceSet;
  import com.twilio.rest.api.v2010.account.Recording;
  import com.twilio.rest.api.v2010.account.RecordingReader;
  
  public class DeleteRecordings1 {
  
      private static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXX";
      private static final String AUTH_TOKEN = "999aa999aaa999aaaa999";
  
      private static final String CALL_SID = "CA83837718818gdgdg";
  
      public static void main(String[] args) {
          try {       
              Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
  
              RecordingReader recordingReader = Recording.reader();
                  recordingReader.setCallSid(CALL_SID);
  
              ResourceSet&lt;Recording&gt; recordings = recordingReader.read();
              String recordingSid;
              for (Recording recording: recordings) { 
                  recordingSid = recording.getSid();              
  
                  //HERE! I want to restore the .wav file associated with that RECORD_SID ?¿
  
              }                       
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>