APIs & Integrations

markmcgookin
Miembro

Contact Created with API not showing in 'All contacts'

resolver

I have created a contact using the API (http POST / JSON)

It shows up if I go to the dashboard => show offline sources and drill down… however when I go to ‘all contacts’ the list is empty and doesn’t show the new contact.

I got a 200 response when creating the contact, and if I try to re-create another one with the same email, I get a conflict response, so I think it has been crated successfully…

Is there some setting I need to enable to show contacts created by the API in the ‘All Contacts’ list?

Thanks,

Mark

1 Soluciones aceptada
markmcgookin
Solución
Miembro

Contact Created with API not showing in 'All contacts'

resolver

Figured this out, as @dadams predicted, I was using the wrong key.

My key was from an App I created (Still no idea where the contacts I created with that went).

I went into the menu on the list > Integrations > Get your hubspot API key > Generate

then used this key and the contacts showed up correctly.

Thanks for the help.

Ver la solución en mensaje original publicado

0 Me gusta
6 Respuestas 6
No aplicable

Contact Created with API not showing in 'All contacts'

resolver

Hi, I have the same issue. any help please?

Thanks.

kfischmann1
Miembro

Contact Created with API not showing in 'All contacts'

resolver

Hi @markmcgookin,

All of your contacts should be showing up in the ‘All Contacts’ view, regardless of their source… Do you have a link you can provide to the contact? I’ll have a look for you.

Regards,
Karl

0 Me gusta
markmcgookin
Miembro

Contact Created with API not showing in 'All contacts'

resolver

Hi Karl,

I get a 200 response from the code, and multiple tries with the same email give me ‘conflict’ response as expected.

My contact list - https://app.hubspot.com/contacts-beta/2573441/ still shows up as empty. I created an ‘App’ to get the hapikey… maybe I’ve done something wrong.

This is the JSON I get returned.

{
   "vid":251,
   "canonical-vid":251,
   "merged-vids":[

   ],
   "portal-id":2573438,
   "is-contact":true,
   "profile-token":"AO_T-mOJR23Od5M7xEiHaxzHN751DymImQqupex09o4OyIDB7y85etNlPlRC7FutYkorh8VzQQZjgHZUZYXT33OXxbb0iJHChw6Ohcch3TiUJPTuCZSugWEgENisQU13Z1cyzZy4prxq",
   "profile-url":"https://app.hubspot.com/contacts/2573438/lists/public/contact/_AO_T-mOJR23Od5M7xEiHaxzHN751DymImQqupex09o4OyIDB7y85etNlPlRC7FutYkorh8VzQQZjgHZUZYXT33OXxbb0iJHChw6Ohcch3TiUJPTuCZSugWEgENisQU13Z1cyzZy4prxq/",
   "properties":{
      "zip":{
         "value":"CO D3",
         "versions":[
            {
               "value":"CO D3",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "firstname":{
         "value":"John",
         "versions":[
            {
               "value":"John",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "website":{
         "value":"www.website.net",
         "versions":[
            {
               "value":"www.website.net",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "address":{
         "value":"123 Fake Street",
         "versions":[
            {
               "value":"123 Fake Street",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "phone":{
         "value":"012345678910",
         "versions":[
            {
               "value":"012345678910",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "city":{
         "value":"Springfield",
         "versions":[
            {
               "value":"Springfield",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "createdate":{
         "value":"1476822928097",
         "versions":[
            {
               "value":"1476822928097",
               "source-type":"API",
               "source-id":"Contacts",
               "source-label":null,
               "timestamp":1476822928097,
               "selected":false
            }
         ]
      },
      "company":{
         "value":"Developer Company",
         "versions":[
            {
               "value":"Developer Company",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "state":{
         "value":"Michigen",
         "versions":[
            {
               "value":"Michigen",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "email":{
         "value":"email1w2@server2.com",
         "versions":[
            {
               "value":"email1w2@server2.com",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      },
      "lastname":{
         "value":"Doe",
         "versions":[
            {
               "value":"Doe",
               "source-type":"API",
               "source-id":null,
               "source-label":null,
               "timestamp":1476822928089,
               "selected":false
            }
         ]
      }
   },
   "form-submissions":[

   ],
   "list-memberships":[

   ],
   "identity-profiles":[
      {
         "vid":251,
         "is-deleted":false,
         "is-contact":false,
         "pointer-vid":0,
         "previous-vid":0,
         "linked-vids":[

         ],
         "saved-at-timestamp":0,
         "deleted-changed-timestamp":0,
         "identities":[
            {
               "type":"EMAIL",
               "value":"email1w2@server2.com",
               "timestamp":1476822928097,
               "source":"UNSPECIFIED"
            },
            {
               "type":"LEAD_GUID",
               "value":"a3113641-923f-4fdf-b1cf-2118559dad8c",
               "timestamp":1476822928138,
               "source":"UNSPECIFIED"
            }
         ]
      }
   ],
   "merge-audits":[

   ]
}
0 Me gusta
Dadams
HubSpot Employee
HubSpot Employee

Contact Created with API not showing in 'All contacts'

resolver

@markmcgookin it looks like you may be crossing hapikeys or access_tokens. The example response you have shows a portal-id of 2573438, which doesn’t match the portal that you’re looking at for the contacts list. Keys and tokens are portal specific, so if you want to create contacts in Hub ID 2573441 you’d need to get the hapikey or access_token for that portal.

markmcgookin
Miembro

Contact Created with API not showing in 'All contacts'

resolver

@dadams - Ah right, that would explain it then. How can I find the appropriate hapikey for a portal or vice versa? I created an App which gave me access to the key, I assumed that that would connect to the one portal I seem to have available to me.

Is there any way from the portal/list screen to find out which key applies?

0 Me gusta
markmcgookin
Solución
Miembro

Contact Created with API not showing in 'All contacts'

resolver

Figured this out, as @dadams predicted, I was using the wrong key.

My key was from an App I created (Still no idea where the contacts I created with that went).

I went into the menu on the list > Integrations > Get your hubspot API key > Generate

then used this key and the contacts showed up correctly.

Thanks for the help.

0 Me gusta