You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Umbraco.Forms.Integrations.Crm.Hubspot/readme.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,15 @@ Requires minimum versions of Umbraco:
11
11
12
12
## How To Use
13
13
14
+
### Authentication
15
+
16
+
The package supports two modes of authentication:
17
+
18
+
- API Key
19
+
- OAuth
20
+
21
+
#### API Key
22
+
14
23
Log into your HubSpot account, go to _Settings > Integrations > API Key_ and create an API key.
15
24
16
25
Add this to a setting in `UmbracoForms.config`:
@@ -19,6 +28,26 @@ Add this to a setting in `UmbracoForms.config`:
19
28
<setting key="HubSpotApiKey" value="[your API key]" />
20
29
```
21
30
31
+
#### OAuth
32
+
33
+
The OAuth flow for authentication will be used if an API key is not configured.
34
+
35
+
When using the workflow, the user will be made aware that the installation is not authenticated with HubSpot and can't currently be used.
36
+
37
+
The will be prompted to click a link which will take them to the HubSpot authentication page for the Umbraco Forms HubSpot app.
38
+
39
+
They will need to log into their HubSpot account and agree to the permissions that the app requires (which is to be able to read and write contact information).
40
+
41
+
They will then be redirected to a website hosted at https://hubspot-forms-auth.umbraco.com which will present an authorization code issued by HubSpot. It's necessary to copy that and paste into the field indicated within the Umbraco Forms installation.
42
+
43
+
Behind the scenes this will make a further request to HubSpot which will return two tokens - an access token and a refresh token. The former will be provided in further API calls to HubSpot to authenticate the request. The latter will be stored via Umbraco's key/value service (which writes to the `umbracoKeyValue` table) and will be used to retrieve a new access token when it expires.
44
+
45
+
A button is available to clear the authentication with HubSpot, following which the authentication process would need to be repeated before the integration can again be used.
46
+
47
+
When the OAuth authentication method is being used, the API call to retrieve the token is proxied via and endpoint on the same website, allowing the Umbraco Forms HubSpot app secret key to remain secret (i.e. not included in configuration or hard-coded into the dll).
48
+
49
+
### Working With the HubSpot/Umbraco Forms Integration
50
+
22
51
Add the "Save Contact to Hubspot" workflow to a form and configure the mappings between the form and Hubspot fields.
23
52
24
53

0 commit comments