3. Setting up the API in Filemaker

3. Setting up the API in Filemaker

To connect to Xero go to configuration layout in the sample FileMaker file given, fill all credentials and then press the button “Setup Credentials”.

The following fields are necessary for creating a connection with xero

  • user_id
  • consumer_key
  • consumer_secret
  • rsa_private_key
  • rsa_public_key

Script:

    • Connection:

It is used to connect the Xero API using the login URL. We are sending login API URL to Xero API based on the filemaker version using Base Elements plugin functions or FileMaker functions and also sending the parameters like consumer key, consumer sercet, private key and public key. Then we got an response which contains a API key which is used for the accessing and sending the information like contacts, invoices, payments etc.. from the Xero.

Example JSON:

Parameters JSON:
{
“user_id” : “56415202-0158-BF4F-B53A-51E6754896AA”,
“consumer_key” : “NzhETEJVSktJMU5WTENNN0FFUVVHV01DV09QTkJI”,
“consumer_secret” : “T0xKUEYyMExPU1ROS1RBUEtONjU4RDZVR0hNMUJP”,
“rsa_private_key” : “LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQ0KTUl JQ1hBSUJBQUtC Z1FD,
“rsa_public_key” : “LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpNSUlDW mpDQ0FjK2dBd0l CQWdJVVQ3ZEp0N0lJeHpLSFUv”,
“is_update” : “1”
}
Response JSON:
{
“status”: true,
“data”: “”,
“api_key”: “fde07d0f60458ce429aae638bbcb4b496d444115”
}