title: Making Twitter OAuth1 PUT request with JSON body with scribejava
body: <p>I am trying to call <a href="https://developer.twitter.com/en/docs/twitter-api/tweets/hide-replies/api-reference/put-tweets-id-hidden#tab0" rel="nofollow noreferrer">this</a> twitter v2 endpoint to hide a tweet using OAuth1 and <a href="https://github.com/scribejava/scribejava" rel="nofollow noreferrer">ScribeJava</a></p>
  <p>Here is what I have tried</p>
  <pre><code>val service = ServiceBuilder(apiKey)
          .apiSecret(apiSecret)
          .build(TwitterApi.instance())
  
      val url = &quot;https://api.twitter.com/2/tweets/${tweetId}/hidden&quot;
  
      val oauth1 = OAuth1AccessToken(token,secret)
      val request = OAuthRequest(Verb.PUT, url)
      request.setPayload(&quot;{ \&quot;hidden\&quot;: true }&quot;)
  
      service.signRequest(oauth1, request)
      val response = service.execute(request)
  </code></pre>
  <p>When I try that I get a <code>400 Bad Request</code> back, what is the proper way to do this?</p>