OnSched.js is initialized by passing your clientId and environment to the OnSched function. OnSched.js will then connect to the API and return an access token to be used by the elements.
After initialization, get instance of elements to use for creating all OnSched.js elements. See the elements tab for more information.
/// Initialize OnSched.js /// Param 1 - Your API ClientId. /// Param 2 - "sbox" for sandbox testing /// "live" for production /// /// NOTE - you must register your domain for authorization. see Overview for more details. /// var onsched = OnSched("<<clientId>>", "sbox"); /// Get instance of elements to use for creating elements var elements = onsched.elements();
Updated 11 months ago