Need help with SmartHub REST connection

  • 40Views
  • Last Post 2 weeks ago
  • Topic Is Solved
0
votes
Brian Kerns posted this 4 weeks ago

I've been trying to set up a REST connection between Skyvia and SmartHub using the information provided by SmartHub and even though the connection seems to test okay, when I try to use it, it just says 'unauthorized'.  I'm not sure if the error is due to some security setting or if I set it up wrong.  Would someone be able to take a look at the attached files and let me know how it is supposed to work?

I set up the metadata similar to another post I saw, but I'm not really entirely sure that it's correct.  I also tried to keep it simple by only adding a couple of fields for testing.

Metadata:

{
  "ProviderConfiguration" : {
  }, 
  "Metadata" : 
  [
    {
      "Name":"getLead",
      "Url":"/getLead",
      "ResultPath": "data",
      "Columns" : [
          {"Name":"Id", APIPath: "id", "DbType":"String", "Primary":true, "Createable":false, "Updateable":false},
          {"Name":"After", APIPath: "after", "DbType":"String", "Createable":false, "Updateable":false},
      ]
    }
  ]
}

I would very much appreciate any help you can offer. Thanks.

Order By: Standard | Newest | Votes
0
votes
Yevheniia Bilotserkovska posted this 4 weeks ago

Hello Brian.

Thank you for contacting us. 

We have replied to you by email. Please check your mailbox.

Best regards,

Yevheniia Bilotserkovska.

0
votes
Brian Kerns posted this 2 weeks ago

For anyone else who may need this.  I was able to get this working using the following metadata and replacing the X's with my API key.

Metadata:

{
"ProviderConfiguration" : {
    "Headers" : [
      { "Key":"x-api-key", "Value" : "XXXXXXXXXXXXXXXXXXXXXXXXXX" },
      { "Key":"Accept", "Value" : "application/json" }
    ],
    "ErrorHandling" : {
      "HtmlResponseError":"Connection settings are invalid. Please check your Domain, User, and/or Password values." 
    }
  },
  "Metadata" : 
  [
    {  
      "Name":"getLead",
      "Url":"/getLead",
      "ResultPath": "data",
      "Method" : "POST",
      "Columns" : [
        {"Name":"Id", "APIPath": "id", "DbType":"String", "Primary":true, "Createable":false, "Updateable":false},
        {"Name":"DateRegistered", "APIPath": "registered", "DbType":"Date", "Createable": false, "Updateable": false},
        {"Name":"FirstName", APIPath: "firstname", "DbType":"String", "Required": true},
        {"Name":"LastName", APIPath: "lastname", "DbType":"String", "Required": true},
        {"Name":"Email", APIPath: "contact.email", "DbType":"String", "Required": true},
        {"Name":"Phone", APIPath: "contact.phone", "DbType":"String", "Required": false},
        {"Name":"Gender", APIPath: "gender", "DbType":"String", "Required": false},
        {"Name":"DateOfBirth", APIPath: "date_of_birth", "DbType":"DateTime", "Required": false},
        {"Name":"Citizenship", APIPath: "contact.country.name", "DbType":"String", "Required": false},
      ]
    }
  ]
}

Close