fill and submit forms using Private App

Hello,

I have used the API call

https://api.hsforms.com/submissions/v3/integration/submit/

to fill and submit a form. Now, I need to migrate and use the new Private APP authentication. The only endpoint I have found and may help is in beta. Which API Endpoint can I use in with Private App?

Thanks for any hint

Ralf

Hi @ralf_f, The best way to use Private App authentication with the HubSpot Forms API is to use the Private App Authentication endpoint.
This endpoint is located at https://api.hubapi.com/oauth/v1/token. You will need to provide your app credentials, such as your app ID and app secret, to generate an access token that can be used to authenticate and access the HubSpot Forms API.
Regards,

___Syeda

Hi Syeda,

I am using Private App authentication already for the CRM API. So how to use is not my question.

For my understanding the Endpoint https://api.hsforms.com/submissions/v3/integration/submit/ does not support Private App authentication and the new version I have found is still in beta?

I like to know which endpoint can I use instead of https://api.hsforms.com/submissions/v3/integration/submit/ ?

Hi @ralf_f, At the moment, the endpoint https://api.hsforms.com/submissions/v3/integration/submit/ does not support Private App authentication.
However, you can use the new HubSpot Forms API v4 beta for authentication with Private Apps.
You can find more information about the API v4 beta here: Accounts Dashboard | HubSpot.
you can also use the HubSpot Forms API v2 endpoint, which supports Private App authentication. The endpoint for this is https://api.hubapi.com/forms/v2/submissions/submit/.
It supports both OAuth and Private App authentication.

Hi Syeda, your link does not work for me: Accounts Dashboard | HubSpot

Where do I find the dicumentation of https://api.hubapi.com/forms/v2/submissions/submit/ ?

Regards
Ralf

Hello Syeda,

I am still waiting for your reply regarding documentation of how to use the API to submit Formdata e.g. https://api.hubapi.com/forms/v2/submissions/submit/

I did not find anything on how to use nor examples of the API endpoint

Regards
Ralf

Hey @ralf_f, Apologies for missing this thread. :disappointed_face:
However, i did some research and found a good article here.
https://knowledge.hubspot.com/forms/how-to-use-the-forms-api

It was published by HubSpot, the API provider.

The article gives an example of how to submit form data to the API:
<code>curl --request POST \
--url https://api.hsforms.com/submissions/v3/integration/submit/:portalId/:formId \
--header ‘content-type: application/json’ \
--data ‘{
“fields”: [
{
“name”: “email”,
“value”: “example@example.com
},
{
“name”: “firstname”,
“value”: “Example”
},
{
“name”: “lastname”,
“value”: “Person”
}
]
}’
</code>

Here you can see that the API endpoint is
<code>https://api.hsforms.com/submissions/v3/integration/submit/:portalId/:formId
</code>

It requires the <code>portalId</code> and <code>formId</code> of your HubSpot account, and you can use the <code>fields</code> parameter to specify the form data.

Hope this helps! :slightly_smiling_face: