Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbrenman/1fb4f161d34edd5ab16249f567877c9e to your computer and use it in GitHub Desktop.
Save lbrenman/1fb4f161d34edd5ab16249f567877c9e to your computer and use it in GitHub Desktop.
AMPLIFY Integration Builder - How To Authenticate a Syncplicity Connector Instance

AMPLIFY Integration Builder - How To Authenticate a Syncplicity Connector Instance

Axway's AMPLIFY Integration Builder contains a robust Syncplicity connector to create integrations that includes content collaboration. In this blog post we'll describe how to authenticate a Syncplicity connector instance. This is also covered in the this video tutorial.

While we are starting in Integration Builder and authenticating a Syncplicity Connector which can be used in your Integration Builder Flows, we'll also see how AMPLIFY Central can be leveraged to expose this connector instance to other teams in your company with added security, governance and monitoring.

Prerequisites

The prerequisites are described below:

  • The following details for your Syncplicity account:
    • Application Token
    • App Key
    • App Secret

Note that An Enterprise Syncplicity instance with admin privileges is required for this

  • Access to Axway's AMPLIFY Integration Builder

  • Access to Axway's AMPLIFY Central

Obtain Your Syncplicity Token, Key and Secret

  • Log into your Syncplicity account and go to the Account Tab. At the bottom of the screen you will see your Application Token as shown below:

  • Log into the Syncplicity Developer Site, click on MY APPS, click CREATE APP, set the scope and press Save as follows:

You will see your App Key and App Secret.

Authenticate Your Integration Builder Syncplicity Connector

  • Sign into Axway's Integration Builder at https://platform.axway.com and click on Connectors in the navigation menu. Locate the Syncplicity Connector by typing Syncplicity in the search field.

  • Hover your mouse over the Syncplicity Tile and click on Authenticate

  • In the configuration page, enter the following:

    • A name for your instance (I named mine Syncplicity GL Scanner)

    • Set Authentication Type to custom

    • Enter your Syncplicity App Token from above

    • Click on Show Optional Fields

    • Enter your Syncplicity App Token from above in the Syncplicity OAuth API Key field

    • Enter your Syncplicity App Secret from above in the Syncplicity OAuth API Secret field

    • Click on Create Instance

Test The Connector

  • Click on the API Docs for the Connector
  • Scroll down the GET /folders/{id}/contents, click on it and click on Try it out
  • Enter 0 for the id to get the contents of your root folder and press the Execute button
  • Your response should look similar to mine below:
[
  {
    "path": "/Demo",
    "name": "Demo",
    "additionalProperties": {},
    "id": "1-7829507",
    "directory": true,
    "properties": {}
  },
  {
    "path": "/Documents",
    "name": "Documents",
    "additionalProperties": {},
    "id": "1-7733041",
    "directory": true,
    "properties": {}
  },
  ...
  {
    "path": "/Work",
    "name": "Work",
    "additionalProperties": {},
    "id": "1-7748795",
    "directory": true,
    "properties": {}
  }
]

At this point you have a working Syncplicity connector that you can use in your Integration Builder Flows.

But wait, there's more!

What if you want to build a mobile app or web site or anything unrelated to Integration Builder. It would be great if we could access this connector outside of Integration Builder. Well, with AMPLIFY you can! All Integration Builder connector instances appear in AMPLIFY Central's API Proxy ready for you to access securely outside of Integration Builder. Let's take a look.

Expose and Secure Your Syncplicity Connector in AMPLIFY Central

Go to https://platform.axway.com and navigate to AMPLIFY Central and click on the API Proxy tab to see your Syncplicity Connector Instance.

Note my Syncplicity Connector instance at the top of the list (Sync GL Scanner_173575)

Click on the proxy to view the details and click on the Policies tab

You can see that the client authentication is set to pass through. Click on the gear icon so we can enable API Key authentication.

Click on the Deployments tab and let's deploy to Test

And now let's add the API to the Catalog

Now we can test our API in the Catalog by creating an Application in Central and subscribing to the API. Click on Apps and add an app.

Add an API Key to the app

Navigate back to the Catalog and click on the click on the Syncplicity API. Click the Subscribe button and enter the team and app that we created above.

Click on the Methods tab and scroll down to the GET /folders/{id}/contents method and enter '0' for the id and click on Execute to see your root level folders as before.

Scroll down further to see the curl command and execute it from a terminal window

curl -is -X GET -H 'Authorization: Apikey 32b4ef3d-ceaf-4ea8-83da-87bf433068d0' 'https://test-e4f77ce669fd0b1a016a22c82f8013c9.apicentral.axwayamplify.com/syncplicity_173575-/folders/0/contents'

Your response will be similar to this:

[
  {
    "path": "/_WORKFLOWDEMO",
    "name": "_WORKFLOWDEMO",
    "additionalProperties": {},
    "id": "1-8846166",
    "directory": true,
    "properties": {}
  },
  {
    "path": "/Audio",
    "name": "Audio",
    "additionalProperties": {},
    "id": "1-7748792",
    "directory": true,
    "properties": {}
  },
  ...
  {
    "path": "/Work",
    "name": "Work",
    "additionalProperties": {},
    "id": "1-7748795",
    "directory": true,
    "properties": {}
  }
]

Now you can use the Syncplicity connector from your web site or mobile app!

Summary

In this blog post we saw how to create an Integration Builder Syncplicity connector for use in our Integration Builder flows for adding Content Collaboration to your flows. In addition, we saw the added advantage of being able to use AMPLIFY Central to expose this connector in a secure fashion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment