ForumCategory: AndroidAndroid push notifications
Francisco Pereira asked 49 years ago

Hi! I was asked by Sean to use this form to submit my dev questions. On my app I need to receive push notifications but first I need to register to Live Person API and I believe I’m having some problems.   The Push notification API key was taking from Firebase Console -> Project Settings -> Cloud Messaging -> “Server key”.   On the app I’m trying the following parameters: val mBrandId = “xxxxx” val token = FirebaseInstanceId.getInstance().token val appId = “com.xxx.xxx.xxx” val authParams = LPAuthenticationParams() authParams.hostAppJWT = authCode // From “AuthorizationCode” request (LP Id & Secret + Authorization token)   LivePerson.registerLPPusher(mBrandId, appId, token, authParams, object : ICallback<Void, Exception> {     override fun onSuccess(p0: Void?) {         Log.d(“**** MessagingActivity -> registerLPPusher”, “Success”)     }       override fun onError(exception: Exception) {         Log.e(“**** MessagingActivity -> registerLPPusher”, exception.message)     } })   Thanks for the help.

2 Answers
Oren Katz Staff answered 1 week ago

You will need to use the Legacy server key from Firebase

Francisco Pereira answered 1 week ago

Thank you Oren. How about the  LPAuthenticationParams() parameter, am I doing it right?

David Villacis Staff replied 2 days ago

Hi @Francisco Pereira,

Are you using implicit or code flow?

if you’re using code flow, you should use this:
val authParams = LPAuthenticationParams() authParams.setAuthKey = authCode

if you’re using implicit flow, you should use this instead:
val authParams = LPAuthenticationParams() authParams.hostAppJWT = jwt

This is related to the configuration of your authentication server on LiveEngage.