Skip to content

Instantly share code, notes, and snippets.

@rohandalvi
Created November 13, 2015 01:04
Show Gist options
  • Save rohandalvi/d4b6b5dbe98b52ce03d1 to your computer and use it in GitHub Desktop.
Save rohandalvi/d4b6b5dbe98b52ce03d1 to your computer and use it in GitHub Desktop.
angellist api returned data. Where to find the code that needs to be sent to angellist to get access token?
/usr/local/bin/node server.js
Auth URL https://angel.co/api/oauth/authorize?client_id=4de5460c00427d9aea168602425ee43e3dd8d312532e9020&scope=email&response_type=code
Listening on port: 8000
DATA { domain: null,
_events: {},
_maxListeners: 10,
output: [],
outputEncodings: [],
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_headerSent: true,
_header: 'GET /api/oauth/authorize?client_id=4de5460c00427d9aea168602425ee43e3dd8d312532e9020&scope=email&response_type=code HTTP/1.1\r\nHost: angel.co\r\nConnection: keep-alive\r\n\r\n',
_hasBody: true,
_trailer: '',
finished: true,
_hangupClose: false,
socket:
{ _readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: false,
endEmitted: false,
reading: true,
calledRead: true,
sync: true,
needReadable: true,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events:
{ end: [Object],
finish: [Object],
sslOutEnd: [Function],
free: [Function],
close: [Object],
agentRemove: [Function],
drain: [Function: ondrain],
error: [Function: socketErrorListener] },
_maxListeners: 10,
_writableState:
{ highWaterMark: 16384,
objectMode: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [] },
writable: true,
allowHalfOpen: true,
pair:
{ domain: null,
_events: [Object],
_maxListeners: 10,
server: undefined,
_secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
_destroying: false,
credentials: [Object],
_rejectUnauthorized: true,
_requestCert: true,
ssl: {},
servername: false,
cleartext: [Circular],
encrypted: [Object],
fd: undefined,
npnProtocol: undefined },
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Circular],
_buffer: [Object] },
_buffer:
{ isFull: false,
pool: <Buffer 16 03 01 01 4c 01 00 01 48 03 03 56 45 35 79 94 08 47 0b 7e 49 02 8c 2f fb c9 c2 87 e9 f9 7f f6 94 75 81 70 88 40 55 81 5f 8b c4 00 00 a0 c0 30 c0 2c c0 ...>,
offset: 8930,
remaining: 10476830 },
_handle: { readStop: [Function], readStart: [Function] },
socket:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 13263,
_bytesDispatched: 659,
_pendingData: null,
_pendingEncoding: '',
read: [Function],
_consuming: true },
encrypted:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Circular],
_buffer: [Object] },
authorized: true,
_controlReleased: true,
parser:
{ _headers: [],
_url: '',
onHeaders: [Function: parserOnHeaders],
onHeadersComplete: [Function: parserOnHeadersComplete],
onBody: [Function: parserOnBody],
onMessageComplete: [Function: parserOnMessageComplete],
socket: [Circular],
incoming: [Object],
maxHeaderPairs: 2000,
onIncoming: [Function: parserOnIncomingClient] },
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
connection:
{ _readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: false,
endEmitted: false,
reading: true,
calledRead: true,
sync: true,
needReadable: true,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events:
{ end: [Object],
finish: [Object],
sslOutEnd: [Function],
free: [Function],
close: [Object],
agentRemove: [Function],
drain: [Function: ondrain],
error: [Function: socketErrorListener] },
_maxListeners: 10,
_writableState:
{ highWaterMark: 16384,
objectMode: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
sync: false,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
buffer: [] },
writable: true,
allowHalfOpen: true,
pair:
{ domain: null,
_events: [Object],
_maxListeners: 10,
server: undefined,
_secureEstablished: true,
_isServer: false,
_encWriteState: true,
_clearWriteState: true,
_doneFlag: false,
_destroying: false,
credentials: [Object],
_rejectUnauthorized: true,
_requestCert: true,
ssl: {},
servername: false,
cleartext: [Circular],
encrypted: [Object],
fd: undefined,
npnProtocol: undefined },
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Circular],
_buffer: [Object] },
_buffer:
{ isFull: false,
pool: <Buffer 16 03 01 01 4c 01 00 01 48 03 03 56 45 35 79 94 08 47 0b 7e 49 02 8c 2f fb c9 c2 87 e9 f9 7f f6 94 75 81 70 88 40 55 81 5f 8b c4 00 00 a0 c0 30 c0 2c c0 ...>,
offset: 8930,
remaining: 10476830 },
_handle: { readStop: [Function], readStart: [Function] },
socket:
{ _connecting: false,
_handle: [Object],
_readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
onend: null,
destroyed: false,
errorEmitted: false,
bytesRead: 13263,
_bytesDispatched: 659,
_pendingData: null,
_pendingEncoding: '',
read: [Function],
_consuming: true },
encrypted:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Circular],
_buffer: [Object] },
authorized: true,
_controlReleased: true,
parser:
{ _headers: [],
_url: '',
onHeaders: [Function: parserOnHeaders],
onHeadersComplete: [Function: parserOnHeadersComplete],
onBody: [Function: parserOnBody],
onMessageComplete: [Function: parserOnMessageComplete],
socket: [Circular],
incoming: [Object],
maxHeaderPairs: 2000,
onIncoming: [Function: parserOnIncomingClient] },
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
agent:
{ domain: null,
_events: { free: [Function] },
_maxListeners: 10,
options: {},
requests: {},
sockets: { 'angel.co:443': [Object] },
maxSockets: 5,
createConnection: [Function: createConnection] },
socketPath: undefined,
method: 'GET',
path: '/api/oauth/authorize?client_id=4de5460c00427d9aea168602425ee43e3dd8d312532e9020&scope=email&response_type=code',
_headers: { host: 'angel.co' },
_headerNames: { host: 'Host' },
parser:
{ _headers: [],
_url: '',
onHeaders: [Function: parserOnHeaders],
onHeadersComplete: [Function: parserOnHeadersComplete],
onBody: [Function: parserOnBody],
onMessageComplete: [Function: parserOnMessageComplete],
socket:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Object],
_buffer: [Object],
_handle: [Object],
socket: [Object],
encrypted: [Object],
authorized: true,
_controlReleased: true,
parser: [Circular],
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
incoming:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
socket: [Object],
connection: [Object],
httpVersion: '1.1',
complete: false,
headers: [Object],
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 200,
client: [Object],
_consuming: false,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req: [Circular] },
maxHeaderPairs: 2000,
onIncoming: [Function: parserOnIncomingClient] },
res:
{ _readableState:
{ highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: false,
ended: false,
endEmitted: false,
reading: false,
calledRead: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
objectMode: false,
defaultEncoding: 'utf8',
ranOut: false,
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
domain: null,
_events: { end: [Function: responseOnEnd] },
_maxListeners: 10,
socket:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Object],
_buffer: [Object],
_handle: [Object],
socket: [Object],
encrypted: [Object],
authorized: true,
_controlReleased: true,
parser: [Object],
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
connection:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Object],
_buffer: [Object],
_handle: [Object],
socket: [Object],
encrypted: [Object],
authorized: true,
_controlReleased: true,
parser: [Object],
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
httpVersion: '1.1',
complete: false,
headers:
{ 'cache-control': 'max-age=0, private, must-revalidate',
'content-type': 'text/html; charset=utf-8',
date: 'Fri, 13 Nov 2015 00:57:29 GMT',
etag: '"fc455f0e1992443dae2794dd8125d30a"',
pragma: 'no-cache',
server: 'nginx',
'set-cookie': [Object],
status: '200 OK',
'strict-transport-security': 'max-age=631152000',
vary: 'Accept-Encoding',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-process': 'app04 3549',
'x-rack-cache': 'miss',
'x-request-id': 'afd643545b92d43a9b8bd621d018bdcf',
'x-runtime': '0.112429',
'x-thanks': 'For using AngelList. Rock on!',
'x-ua-compatible': 'IE=Edge,chrome=1',
'x-xss-protection': '1; mode=block',
'transfer-encoding': 'chunked',
connection: 'keep-alive' },
trailers: {},
_pendings: [],
_pendingIndex: 0,
url: '',
method: null,
statusCode: 200,
client:
{ _readableState: [Object],
readable: true,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: true,
allowHalfOpen: true,
pair: [Object],
_pending: null,
_pendingEncoding: '',
_pendingCallback: null,
_doneFlag: false,
_retryAfterPartial: false,
_halfRead: false,
_sslOutCb: null,
_resumingSession: false,
_reading: true,
_destroyed: false,
_ended: false,
_finished: false,
_opposite: [Object],
_buffer: [Object],
_handle: [Object],
socket: [Object],
encrypted: [Object],
authorized: true,
_controlReleased: true,
parser: [Object],
_httpMessage: [Circular],
ondata: [Function: socketOnData],
onend: [Function: socketOnEnd],
npnProtocol: undefined },
_consuming: false,
_dumped: false,
httpVersionMajor: 1,
httpVersionMinor: 1,
upgrade: false,
req: [Circular] } }
Got access token {"error":"invalid_grant","error_description":"Your authorization for this user has been revoked."}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment