vimeo-networking-java icon indicating copy to clipboard operation
vimeo-networking-java copied to clipboard

Android app crashes while trying to authenticate with access token got from vimeo developer dashboard. Below is the stacktrace

Open vkfan opened this issue 3 years ago • 0 comments

  • Stacktrace

    Caused by: java.lang.IllegalStateException: Authentication is not supported when using a fixed access token at com.vimeo.networking2.internal.NoOpAuthenticatorImpl.reject(NoOpAuthenticatorImpl.kt:85) at com.vimeo.networking2.internal.NoOpAuthenticatorImpl.authenticateWithClientCredentials(NoOpAuthenticatorImpl.kt:23) at com.radio.playbackspeeddemo.PlayApp.onCreate(PlayApp.kt:27) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1190) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6850)


  • Code causing issue:

val accessToken: String = "token here" var vimeoApiConfiguration: VimeoApiConfiguration? = null var vimeoApiClient: VimeoApiClient? = null

    vimeoApiConfiguration = VimeoApiConfiguration.Builder(accessToken)
        .build()
    val authenticator = Authenticator(vimeoApiConfiguration!!)

    vimeoApiClient = VimeoApiClient(vimeoApiConfiguration!!, authenticator)

    authenticator.authenticateWithClientCredentials(
        vimeoCallback(
            onSuccess = {
                Log.e("vimeo success", "vimeo success")
            },
            onError = {
                Log.e("vimeo failed", "vimeo failed")
            }
        )
    )

vkfan avatar Oct 21 '21 19:10 vkfan