Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
401 Unauthorised error While calling MCS API in Ionic 3 — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

401 Unauthorised error While calling MCS API in Ionic 3

Received Response
6
Views
9
Comments
edited Jul 24, 2017 7:00AM in Digital Assistant and Mobile 9 comments

Summary

401 Unauthorised error While calling MCS API in Ionic 3

Content

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

declare var mcs:any;

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

constructor(public http: Http) {

   console.log('Hello SampleProvider Provider');

  }

initializeMCS(){

   mcs.mobileBackendManager.platform = new mcs.CordovaPlatform();

   mcs.mobileBackendManager.setConfig(mcs_config);

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!