An ExternalApplication is a module that allows you to generate a long lasting token. This is generated when the user installs the application, and if you require, can be posted back to you or copied by the user.


Each module can be used in conjunction with each other, however, the ExternalApplication allows you to access users data when they are not using your integration. This can allow you to synchronise data, or allow them to access their data from a mobile application. A standard manifest for this would be:

 

{
  "modules": [
    {
      "type": "ExternalApplication"
    }
  ]
}

 

This is the default manifest for Linnworks. Installing this application will display a token for the user. They can then add it into your system, and calling the AuthorizeByApplication method with your ApplicationId and ApplicationSecret will allow you to access their data.


Sometimes, you may want to postback the users token to remove the flow of having to add the token. This can be achieved by using the manifest below:


  

{
  "modules": 
    [{
      "type": "ExternalApplication",
      "parameters": 
        [{
          "name": "PostbackUrl",
          "value": "http:\/\/www.google.co.uk?token=[{TOKEN}]&tracking=[{TRACKING}]"
        }]
    }]
}

 

 As you can see now we have a parameter called PostbackUrl. This takes placeholders like above, but also provides a tracking code from the installation. You can supply the tracking code when sending the user to the install link, through the following example:

https://apps.linnworks.net/Authorization/Authorize/MY_APPLICATION?Tracking=1234tracking


Then, once the user has installed the application, we will post to your URL confirming that this has occurred.