[Solved] Android Studio : You got banned permanently from this server in android studio


I was not adding User-Agent in header so the server refused all my request.Thats why I got banned from the server.

return builder.addInterceptor(interceptor)
                        .addInterceptor {
                            val original = it.request();

                            val authorized = original.newBuilder()
                                    .removeHeader("User-Agent")
                                    .addHeader("User-Agent", System.getProperty("http.agent"))
                                    .build();

                            it.proceed(authorized);
                        }
                        .build()

For better understanding about user-agent, go through this link.

1

solved Android Studio : You got banned permanently from this server in android studio