JavaScript SDK

Overview of the PDX CitySync Javascript SDK and methods available to developers for use in their apps.

Core Methods

The PDX CitySync JavaScript SDK gives you access to the following API calls:

  • CitySync.connnect - create connection to PDXCitySync and receive app and user data.
    Accepts an optional callback if your application depends on user or app data.
  • CitySync.resizeFrame - send a call to resize your app's iframe on PDX CitySync
  • CitySync.sendAlert - send an alert to PDX CitySync's alerts framework


Before your application can receive user data, you'll need to first initiate the connection using the CitySync.connect API call:

<script type="text/javascript">
        // Proceed with your app

CitySync.init will return 'success' on successful authentication, and two data objects will become available to your app: CitySync.user and CitySync.appdata:

CitySync.user - contains user's location and interests.

CitySync.user = {
      lat: num,
      long: num

CitySync.appdata - contains the path to your application's full view on PDX CitySync and detail page in the app catalog:

CitySync.appdata ={


You can call this method whenever you need to resize your apps' iframe on PDX CitySync:

<script type="text/javascript">


You can use sendAlert to send a message to PDX CitySync's alert framework, which will be displayed on the user's homepage:

<script type="text/javascript">
  CitySync.sendAlert("This is an alert message");

Continue reading Sample App: Local Schools