title: oAuth 1.0 get request retrofit android
body: <p>I want to implement oAuth 1.0 get request using Retrofit but not able to get response.</p>
  
  <p><a href="https://i.stack.imgur.com/xq1je.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xq1je.png" alt="enter image description here"></a></p>
  
  <p>Response of Postman:</p>
  
  <pre><code>{
      "1": {
          "entity_id": "1",
          "parent_id": "0",
          "position": "0",
          "level": "0",
          "name": "Root Catalog"
      },
      "2": {
          "entity_id": "2",
          "parent_id": "1",
          "position": "1",
          "level": "1",
          "name": "Default Category",
          "is_active": "1"
      }
  }
  </code></pre>
  
  <p>My interface is:</p>
  
  <pre><code> @GET("/api/rest/categories/?")
      @Headers({ "Content-Type: application/json"})
      Call&lt;ResponseBody&gt; getProduct( @Field("oauth_consumer_key") String grantType,
                                     @Field("oauth_token") String username,
                                     @Field("oauth_signature_method") String sig,
                                     @Field("oauth_timestamp") String timS,
                                     @Field("oauth_nonce") String nonc,
                                     @Field("oauth_version") String vers,
                                     @Header("Authorization") String authorization);
  </code></pre>
  
  <p>Method call is:</p>
  
  <p>private void callService(){</p>
  
  <pre><code> byte[] credentials = "CONSUMER_SECRETE:TOKEN_SECRETE".getBytes();
   String basicAuth = "Basic " + Base64.getEncoder().encodeToString(credentials);
  
  UserClient apiService = ApiClient.getClient().create(UserClient.class);
  Call&lt;ResponseBody&gt; call = apiService.getProduct("CONSUMER_KEY","TOKEN_KEY","HMAC-SHA1","1502218838","RuH2FG","1.0",basicAuth);
  call.enqueue(new Callback&lt;ResponseBody&gt;() {
      @Override
      public void onResponse(Call&lt;ResponseBody&gt;call, Response&lt;ResponseBody&gt; response) {
          if (response.isSuccessful()){
              if (response.isSuccessful()){
  
              }else{
                  Toast.makeText(getApplicationContext(), "Failed", Toast.LENGTH_LONG).show();
              }
          }else{
              //First Option of error handling..
              switch(response.code()){
                  case 404:
                      Toast.makeText(getApplicationContext(),R.string.server_error404, Toast.LENGTH_SHORT).show();
                      break;
                  case 500:
                      Toast.makeText(getApplicationContext(),R.string.server_error500, Toast.LENGTH_SHORT).show();
                      break;
                  default:
                      Toast.makeText(getApplicationContext(),R.string.server_errorUnknow, Toast.LENGTH_SHORT).show();
              }
          }
  
  
      }
      @Override
      public void onFailure(Call&lt;ResponseBody&gt;call, Throwable t) {
  
          Toast.makeText(getApplicationContext(), t.getMessage(), Toast.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p>}</p>
  
  <p>What have I also tried:
  <a href="https://stackoverflow.com/questions/30135471/android-oauth-retrofit-access-token-request">Android OAuth Retrofit Access Token Request</a></p>
  
  <p>and also try other types, but none of them have worked.</p>
  
  <p>Can any one help me to fix this issue? i want to implement this with retrofit.</p>