Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Your Authentication type: basicAuth undefined,

edited Mar 24, 2017 7:00AM in Digital Assistant & Mobile 22 comments

Summary

Your Authentication type: basicAuth undefined,

Content

var mcs_config = {

  "logLevel": mcs.LOG_LEVEL.INFO,

  "logHTTP": true,

  "mobileBackends": {

    "TEST": {

      "default": true,

      "baseUrl": "https://development1-inalgarytmtrial.mobileenv.us2.oraclecloud.com:443",

      "applicationKey": "YOUR_BACKEND_APPLICATION_KEY",

        "authorization": {

        "basicAuth": {

          "backendId": "d838ab82-9755-4f54-bca1-38270afac134",

          "anonymousToken": "SU5BTEdBUllUTVRSSUFMX0RFVkVMT1BNRU5UMV9NT0JJTEVfQU5PTllNT1VTX0FQUElEOkFyZzJlanZfc3oxcW1h"

        }

      }

    }

  },

};

  // initialize MCS mobile backend

    mcs.MobileBackendManager.setConfig(mcs_config);

    var mbe = mcs.MobileBackendManager.getMobileBackend('TEST');

    mbe.setAuthenticationType("basicAuth");

var invokeCustomAPI = function(uri,method,payload) {

  var deferred = $q.defer();

   mbe.CustomCode.invokeCustomCodeJSONRequest(uri , method , payload

   , function(statusCode,data) {deferred.resolve(data)}

   , function(statusCode,data) {deferred.reject(statusCode,data)});        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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