title: Twitter API with JavaScript: delete tweet
body: <p>I’m currently building an meteor app which should make use of the twitter API. Therefor I’m using the <code>mrt:twit</code> meteor package (<a href="https://atmospherejs.com/mrt/twit" rel="nofollow noreferrer">https://atmospherejs.com/mrt/twit</a>).</p>
  
  <p>I have created an app at <a href="https://apps.twitter.com" rel="nofollow noreferrer">https://apps.twitter.com</a> with my twitter account and I’m using my consumer_key, consumer_secret, oauth_access_token and oauth_access_token_secret within the meteor app.</p>
  
  <p>What is working: I can query tweets and access all data available. I can also post tweets.</p>
  
  <p>Whats not working: I cannot delete a tweet. I get this message:</p>
  
  <pre><code> { [Error: Your credentials do not allow access to this resource]
     message: 'Your credentials do not allow access to this resource',
     statusCode: 403,
     code: 220,
     allErrors:
     [ { message: 'Your credentials do not allow access to this resource',
         code: 220 } ],
     twitterReply: '{"errors":[{"message":"Your credentials do not allow access to this resource","code":220}]}' }
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>'deleteSingleTweet': function(tweet_id) {
  
          Twit = new TwitMaker({
              consumer_key: consumer_key,
              consumer_secret: consumer_secret,
              access_token: oauth_access_token,
              access_token_secret: oauth_access_token_secret
          });
  
          const DeleteSingleTweetPromise = new Promise((resolve, reject) =&gt; {
  
              Twit.get(`statuses/destroy/${tweet_id}`, function(err, data, response) {
                  if (err) {
                      reject(err);
                  } else {
                      resolve(data);
                  }
              });
          });
  
          DeleteSingleTweetPromise
          .then(data =&gt; {
              console.log(data);
          })
          .catch(err =&gt; {
              console.log(err);
          });
  }
  </code></pre>
  
  <p>Has anybody an idea what I'm doing wrong here?</p>