Skip to content

Commit

Permalink
Adding HubSpot Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaitanya Surapaneni committed Dec 13, 2018
1 parent 8347402 commit 444f3b2
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 0 deletions.
63 changes: 63 additions & 0 deletions providers/hubspot/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "Hubspot",
"desc": "HubSpot offers a full stack of products for marketing, sales, and customer relationship management: powerful alone, and even better when used together.",
"url": "https://api.hubapi.com",
"oauth2": {
"authorize": {
"url": "https://app.hubspot.com/oauth/authorize",
"query": {
"client_id": "{client_id}",
"scope": "{scope}",
"redirect_uri": "{{callback}}"
}
},
"access_token": {
"url": "/oauth/v1/token",
"method": "post",
"query": {
"grant_type": "authorization_code",
"client_id": "{client_id}",
"client_secret": "{client_secret}",
"redirect_uri": "{{callback}}",
"code": "{{code}}"
}
},
"request": {
"headers": {
"Authorization": "Bearer {{token}}"
}
},
"refresh": {
"url": "/oauth/v1/token",
"method": "post",
"query": {
"grant": "refresh_token",
"client_id": "{client_id}",
"client_secret": "{client_secret}",
"redirect_uri": "{{callback}}"
}
},
"parameters": {
"client_id": "string",
"client_secret": "string",
"scope": {
"values": {
"contacts": "Contacts, Companies, and Deals, along with the associated property APIs, Engagements API, Owners API",
"content": "All COS APIs, Calendar API, Email and Email Events APIs",
"reports": "Keywords API",
"social": "Social Media API",
"automation": "Workflows API",
"timeline": "Timelines API",
"forms": "Forms API",
"files": "File Manager API",
"hubdb": "HubDB API",
"transactional-email": "Transactional Email API"
}
}
},
"href": {
"docs": "http://developers.hubspot.com/docs",
"provider": "https://www.hubspot.com"
}
}
}
Binary file added providers/hubspot/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added providers/hubspot/keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added providers/hubspot/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions providers/hubspot/me.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var me = {
url: "/oauth/v1/access-tokens/{{access_token}}",
params: {},
fields: {
user_id: function (me) {
return me.user_id
},
email: function (me) {
return me.user
}
}
};

module.exports = me;
22 changes: 22 additions & 0 deletions providers/hubspot/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"settings": {
"createApp": {
"url": "https://developers.hubspot.com/docs/faq/how-do-i-create-an-app-in-hubspot",
"image": "config.png"
},
"copyingKey": {
"url": "https://developers.hubspot.com/docs/faq/how-do-i-create-an-app-in-hubspot",
"image": "keys.png"
},
"install": {
"href": {
"provider": "https://www.hubspot.com/",
"docs": "https://developers.hubspot.com/docs/faq/how-do-i-create-an-app-in-hubspot"
}
},
"sample": {
"method": "get",
"url": "/contacts/v1/lists"
}
}
}

0 comments on commit 444f3b2

Please sign in to comment.