Created
November 16, 2016 03:47
-
-
Save rachelpw/7d6fae96f0d98f4fe4b4b9cde5af6376 to your computer and use it in GitHub Desktop.
This shows you how to make a person using node. Download the request library by running 'node install request'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var formData = { | |
"name": "Hodor", | |
"emails": [{"email": "hodor@hodor.com","category": "work"}], | |
"tags": ["hodorhodor"], | |
} | |
var headers = { | |
"Content-Type": "application/json", | |
"X-PW-AccessToken" : "YOURAPIKEY", | |
"X-PW-Application" : "developer_api", | |
"X-PW-UserEmail" : "YOUREMAIL", | |
}; | |
var opts = { | |
url: 'https://api.prosperworks.com/developer_api/v1/people', | |
method: "post", | |
headers: headers, | |
json: true, | |
body: formData | |
}; | |
request.post(opts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error: Cannot find module 'request'
Trying to figuring out this
request
module issue but unfortunately no luck. Is there any other way to make a lead in prosperworks withnodeJs
other thanrequest
module? or can you please help me figuring out this issue. I have a form, I just want to create lead on form submit. Any help would be appreciated. Thanks