UALib: AirshipChannel - Channel registration failed with status: 401

Hi.

We are getting this error after integrating the Airship SDK.

UALib: AirshipChannel - Channel registration failed with status: 401

We are blocked because of it as we cannot test the pushes or the analytics setup.

Please note that we added the correct app key and secret key. 

Didn't find what you were looking for?

New post

Comments

3 comments

  • Hello,

    This is Kay from Airship Technical Support.

    A 401 status generally indicates an issue with the credentials.

    Can you double check that you're using the App Secret in your app's code, and not the Master Secret?

    If you're certain you're using the App Secret, can you provide the App Key of the affected project so I can take a closer look? (Please don't provide either the App Secret or the Master Secret here.)

    Comment actions Permalink
  • We can close this. The issue was that we were not specifying site=EU in the config file

    Comment actions Permalink
    0
  • Hi,

    I have the same issue, but I have set the site property correctly, as following:

    class SampleAutopilot : Autopilot() {
    // ...
    override fun onAirshipReady(airship: UAirship) {
    // Custom Message Center
    MessageCenter.shared().setOnShowMessageCenterListener { messageId: String? ->
    true
    }

    // Notification handling
    val airshipListener = AirshipListener()
    airship.pushManager.addPushListener(airshipListener);
    airship.pushManager.notificationListener = airshipListener;


    // etc...
    }

    override fun createAirshipConfigOptions(context: Context): AirshipConfigOptions? {
    // Airship initialize
    val builder = AirshipConfigOptions.newBuilder()
    builder.setSite(AirshipConfigOptions.SITE_EU).setAppKey("**********").setAppSecret("*******")
    builder.setUrlAllowList(arrayOf("*"))
    return builder.build()
    }
    }

    I use airship version 16.8.0, i verified the credential. Camelia Tripon specified the site in config file but where is the location of it? I tried also to define manually the airshipconfig.properties file in my application's assets directory but I have still the same error. 

    Comment actions Permalink
    0

Please sign in to leave a comment.