401 Unauthorised error While calling MCS API in Ionic 3
Summary
401 Unauthorised error While calling MCS API in Ionic 3Content
Hi,
I have developed an application for connecting cordova mcs client sdk in Ionic 3 but unfortunately I got unauthorised 401 error
I have followed the steps given below to call mcs API
var backend;
var mcs_config = {
"logLevel": mcs.LOG_LEVEL,
"logHTTP": true,
"mobileBackends": {
"CUST_FW_SCREEN_MB1.0": {
"default": true,
"baseUrl": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"applicationKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"analytics": {
"location": true
},
"authorization": {
"basicAuth": {
"backendId": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"anonymousToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
}
}
}
then I have intialised mcs like this
console.log('Hello SampleProvider Provider');
}
initializeMCS(){
mcs.mobileBackendManager.platform = new mcs.CordovaPlatform();
mcs