title: Contact form 7 to external API
body: <p>I am trying to connect Contact Form 7 in wordpress to a external API following this instructions:</p>
  <p><a href="https://www.youtube.com/watch?v=QOjpqHFM9v8&amp;ab_channel=TechiePress" rel="nofollow noreferrer">https://www.youtube.com/watch?v=QOjpqHFM9v8&amp;ab_channel=TechiePress</a></p>
  <p>I need to add authorization to access to the API like in the screenshot attached.</p>
  <p>Any help would be great
  Thanks in advance</p>
  <p><a href="https://i.imgur.com/rypl8vo.jpg" rel="nofollow noreferrer">https://i.imgur.com/rypl8vo.jpg</a></p>
  <pre><code>
  function techiepress_cf7_api_sender( $contact_form) {
      $title = $contact_form-&gt;title;
  
      if ($title === 'Web Response' ) {
          $submission = WPCF7_Submission::get_instance();
  
          if ( $submission )  {
              $posted_data = $submission-&gt;submission-&gt;get_posted_data();
  
              $name = $posted_data['your-name'];
              $email = $posted_data['your-email'];
              $telefon = $posted_data['your-phone'];
              $adress = $posted_data['your-message'];
              $postnummer = $posted_data['number-777'];
  
              $url = '';
  
              $args = array (
                  'body' =&gt; array(
                      'name' =&gt; $name,
                      'email' =&gt; $email,
                      'telefon' =&gt; $telefon,
                      'adress' =&gt; $adress,
                      'postnummer' =&gt; $postnummer,
                      
                  )
  
              );
  
              wp_remote_post( $url, $args);
  
              return;  ´´´
  
  
    [1]: https://i.stack.imgur.com/a1Eca.png
  </code></pre>