In list of portals select required portal (No error messages everything seems fine)
On my portal I navigate to contact card
And I don’t see my extension.
Sample json from fetch uri:
{"results":{"0":{"objectId":123,"email":"sample@mail.com","title":"SampleData create value API call test","sampleData":"Some data"}},"totalCount":1}
Notes:
I’m under free type subscription. (If it can any way be the reason, but for dev purposes it would not have sense )
No API requests are indicated in Monitoring section
And one more thing is that there is no request to my server side server at all in log So it seems it doen’t even does the request to fetch my side data
Don’t think that it is the case, but will true to create with full data response from documentation.
Do explain why I don’t think so:
Data in response of documentation is fully for sample type object with actions (as it shows in documentation screenshots)
I I got it from documentation main fields are: "objectId", - But not clear if it is just id to store my data fetch or is id of Object type "title" - Title is just header for my custom block
How exactly is the data fetch response being formatted? Based on the sample JSON you provided, it looks like it might not match the expected response format listed in the overview doc. Here’s an example data fetch response:
{
"results": [
{
"objectId": 245,
"title": "API-22: APIs working too fast",
"link": "http://example.com/1",
"created": "2016-09-15",
"priority": "HIGH",
"project": "API",
"reported_by": "msmith@hubspot.com",
"description": "Customer reported that the APIs are just running too fast. This is causing a problem in that they're so happy.",
"reporter_type": "Account Manager",
"status": "In Progress",
"ticket_type": "Bug",
"updated": "2016-09-28",
"actions": [
{
"type": "IFRAME",
"width": 890,
"height": 748,
"uri": "https://example.com/edit-iframe-contents",
"label": "Edit",
"associatedObjectProperties": []
},
{
"type": "IFRAME",
"width": 890,
"height": 748,
"uri": "https://example.com/reassign-iframe-contents",
"label": "Reassign",
"associatedObjectProperties": []
},
{
"type": "ACTION_HOOK",
"httpMethod": "PUT",
"associatedObjectProperties": [],
"uri": "https://example.com/tickets/245/resolve",
"label": "Resolve"
},
{
"type": "CONFIRMATION_ACTION_HOOK",
"confirmationMessage": "Are you sure you want to delete this ticket?",
"confirmButtonText": "Yes",
"cancelButtonText": "No",
"httpMethod": "DELETE",
"associatedObjectProperties": [
"protected_account"
],
"uri": "https://example.com/tickets/245",
"label": "Delete"
}
]
}
],
"settingsAction": {
"type": "IFRAME",
"width": 890,
"height": 748,
"uri": "https://example.com/settings-iframe-contents",
"label": "Settings"
},
"primaryAction": {
"type": "IFRAME",
"width": 890,
"height": 748,
"uri": "https://example.com/create-iframe-contents",
"label": "Create Ticket"
}
}
Also I think I see possible mistake of my, but have not tested it yet. So maybe in this case you can tell if it is the right direction (anyway if no other suggestions would test it ). I think I misunderstood a bit the oauth targets, and I must call authorization with not the hubspot redirect uri, but with my fetch uri target?
I mean instead of: ../oauth/authorize?client_id=xxx&client_secret=xxx&redirect_uri=https%3A%2F%2Fapp.hubspot.com%2F&scope=contacts
it must be ../oauth/authorize?client_id=xxx&client_secret=xxx&redirect_uri=https://sample.uri/fetch-data&scope=contacts
Will try it out tomorrow, as need few updates to set my server to https
Tested to authorize with my own https link redirct, and it had no effect :(. So still as I see the main reason for authorization link is mostly for API usage from my side.
Based solely on the video you included, there isn’t any data being returned from your data fetch URI since it was just set to http://sample.uri. When an object (in this case, a contact) is loaded, the CRM makes a request to the data fetch URI in order to get sales objects for a given record. Since the data fetch URI wasn’t real, no data was returned. Are you using an actual data fetch URI in your tests? I’ve included the CRM Extensions Overview below, for reference:
Yes the uri on video is dummy and there for has no proper response.
My clear url that I set in extension is returning content with application/json header. And return data is described in my text flow description