Error when building LineMessagingClient ( Local server running on Docker)


I want to build LineMessagingClient with channel_token which is saved inside my local DB.


When I test API with Postman, it only returned 502 Bad gateway and [log.debug("Build LineMessagingClient");] couldn't be reached when I check app log.


private LineMessagingClient getLineMessagingClient() {
        LineMessagingClient client = LineMessagingClient.builder(channel_token)
        log.debug("Build LineMessagingClient");
        return client;

channel_token get from local DB.


I try to create another method with connect to LINE by HttpURLConnection and it worked. But I want to use SDK instead.


Java: JDK1.8.0_321.jdk LINE Messaging API SDK : v.4.8.0 Refer: https://github.com/line/line-bot-sdk-java/tree/master/line-bot-api-client Synopsis I'm running my server on Docker.

Please help me. Thanks!

  • 0
  • 3
  • 467
  • twitter facebook

I figured that beside LINE Messaging API SDK, I need to add okhttp3, retrofit, okio, etc ( about 17 additional libraries). After included all of additional libraries, it works.

  • 0

@ksyt: Thank for reply me.

  1. what happens if you write channel-access-token directly in the code? It is same result. There is still 502 error.

  2. did you read error message? I cannot see any error message except 502 error of nginx. Is there any way to catch error when run build()? LineMessagingClient.builder(channel_token).build(); Is that enough if I config only channel_token for connect to LINE server?

  • 0
  1. what happens if you write channel-access-token directly in the code?
  2. did you read error message?
  • 1



本当によろしいですか? question.vm