Hi,
When using "https://api.hubapi.com/contentsearch/v2/search…" to retrieve all the knowledgebase articles, urls are coming in differently for users. Some users are reporting they see “/_hcms/analytics/search/conversion?redirect…” instead of the actual url. What can be done about this?
Hi @MCrawford7,
Thank you for reaching out to the Community!
I’d be happy to put you in touch with some of our Top Experts and some Community Members: Hi @arlogilbert, @JamesClarke, @YBederov, @MikeJennings, @Mohesh_Borah, @speedplane, @zach_threadintn @Anton and @Teun do you have the same behavior? Do you have tips or workarounds to share with @MCrawford7, please?
I also found these threads which might be of interest:
- Knowledge Base API Documentation
- Knowledge Base articles API for search and get content
Thank you so much and have a brilliant day!
Best,
Bérangère
Hi @MCrawford7 
It’d be great if you could share a specific example outlining in detail your request and the response you get back from the relevant HubSpot API. This should help the community troubleshoot the issue you’re experiencing.
Hi Zach,
This is the request: https://api.hubapi.com/contentsearch/v2/search?portalId=portalIdHidden&term=a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z&type=KNOWLEDGE_ARTICLE&limit=1000
This is what some of our customers are receiving as the beginning of the url:
_hcms/analytics/search/conversion?redirect=aHR0cHM6Ly9oZWxwbWUuZXZlcmxvZ2ljLmNvbS9oZWxwL2V2ZXJsb2dpYy1xdWlja2Jvb2tzLWludGVncmF0aW9uLXRpbWVsaW5l&ct
Does anyone have any ideas as to what’s happening? It seems like this is mostly happening on our customer’s laptops.
Since I never got a reply , I had to come up with my own fix using the HubSpot API.
Used this url to return everything from the Knowledge Base:
https://api.hubapi.com/cms/v3/site-search/search?q=a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z&limit=1000&type=KNOWLEDGE_ARTICLE
In order to run this I needed to create a Private App Key under Settings, Integrations, Private Apps and sent this key in the Header Authorization.