title: Why i can't send my OneSignal notification?
body: <p>My code is like this:</p>
  <pre><code>private void sendNotifiaction(String receiver, final String message){
          try {
              String jsonResponse;
  
              URL url = new URL(&quot;https://onesignal.com/api/v1/notifications&quot;);
              HttpURLConnection con = (HttpURLConnection)url.openConnection();
              con.setUseCaches(false);
              con.setDoOutput(true);
              con.setDoInput(true);
  
              con.setRequestProperty(&quot;Content-Type&quot;, &quot;application/json; charset=UTF-8&quot;);
              con.setRequestProperty(&quot;Authorization&quot;, &quot;Basic API_KEY&quot;);
              con.setRequestMethod(&quot;POST&quot;);
  
              String strJsonBody = &quot;{&quot;
                      +   &quot;\&quot;app_id\&quot;: \&quot;APP_ID\&quot;,&quot;
                      +   &quot;\&quot;include_external_user_ids\&quot;: [\&quot;&quot; + receiver + &quot;\&quot;],&quot;
                      +   &quot;\&quot;channel_for_external_user_ids\&quot;: \&quot;push\&quot;,&quot;
                      +   &quot;\&quot;data\&quot;: {\&quot;foo\&quot;: \&quot;bar\&quot;},&quot;
                      +   &quot;\&quot;contents\&quot;: {\&quot;en\&quot;:\&quot;&quot; + message + &quot;\&quot;}&quot;
                      + &quot;}&quot;;
  
  
              System.out.println(&quot;strJsonBody:\n&quot; + strJsonBody);
  
              byte[] sendBytes = strJsonBody.getBytes(&quot;UTF-8&quot;);
              con.setFixedLengthStreamingMode(sendBytes.length);
  
              OutputStream outputStream = con.getOutputStream();
              outputStream.write(sendBytes);
  
              int httpResponse = con.getResponseCode();
              System.out.println(&quot;httpResponse: &quot; + httpResponse);
  
              if (  httpResponse &gt;= HttpURLConnection.HTTP_OK
                      &amp;&amp; httpResponse &lt; HttpURLConnection.HTTP_BAD_REQUEST) {
                  Scanner scanner = new Scanner(con.getInputStream(), &quot;UTF-8&quot;);
                  jsonResponse = scanner.useDelimiter(&quot;\\A&quot;).hasNext() ? scanner.next() : &quot;&quot;;
                  scanner.close();
              }
              else {
                  Scanner scanner = new Scanner(con.getErrorStream(), &quot;UTF-8&quot;);
                  jsonResponse = scanner.useDelimiter(&quot;\\A&quot;).hasNext() ? scanner.next() : &quot;&quot;;
                  scanner.close();
              }
              System.out.println(&quot;jsonResponse:\n&quot; + jsonResponse);
  
          } catch(Throwable t) {
              t.printStackTrace();
          }
      }
  </code></pre>
  <p>I copy it from OneSignal documentation but I never am able to send any notification when the method is called. I had tested it with a simple app but still cant. Can someone show me where I was wrong</p>