title: Android - Retrofit2 - 403-Forbidden
body: <p>I am creating an application with retrofit2 for network calls. I need call multiple API in Single Activity. Now I am facing the <strong>403-forbidden</strong> error. If I call only one API it is working fine. But if I use multiple API calls one by one then I am facing this error. </p>
  
  <p>My CreateService method is below:</p>
  
  <pre><code>public static &lt;S&gt; S createService(Class&lt;S&gt; serviceClass, final String authToken) {
          if (authToken != null) {
              httpClient.addInterceptor(new Interceptor() {
                  @Override
                  public Response intercept(Interceptor.Chain chain) throws IOException {
                      Request original = chain.request();
  
                      // Request customization: add request headers
                      Request.Builder requestBuilder = original.newBuilder()
                              .header("Authorization-Token", authToken)
                              .method(original.method(), original.body());
  
                      Request request = requestBuilder.build();
                      return chain.proceed(request);
                  }
              });
          }
  
  //        OkHttpClient client = httpClient.readTimeout(60, TimeUnit.SECONDS).connectTimeout(60, TimeUnit.SECONDS).build();
          Dispatcher dispatcher = new Dispatcher(Executors.newFixedThreadPool(200));
          dispatcher.setMaxRequests(200);
          dispatcher.setMaxRequestsPerHost(1);
  
          OkHttpClient okHttpClient = httpClient.dispatcher(dispatcher).connectionPool(new ConnectionPool(100, 30, TimeUnit.SECONDS)).build();
  
          Retrofit retrofit = builder.client(okHttpClient).build();
          return retrofit.create(serviceClass);
      }
  </code></pre>
  
  <p>What is wrong in my code.. How can I handle this?</p>