Integrating REST API with NodeJS

I need to know how to use api in nodejs request.(POST)
request(options, callback);

var headers = {
	    'Content-Type': 'application/json',
	    'Accept':'application/json',
	    'Grpc-Metadata-Authorization': 			'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1zZXJ2ZXIiLCJleHAiOjE1MjkxMTI0MzMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTUyOTAyNjAzMywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYWRtaW4ifQ.fTHoa3JlLA6M1DhVyOIYothquStxV8c5uAQLEpg_nw8'		
	};

var dataString = {  
	   "adrInterval": 0,  
	   "appEUI": "3000000000010752",  
	   "appKey": "10000000000000000000000000000001",  
	   "applicationID": 1,  
	   "description": "3000000000010752",  
	   "devEUI": "3000000000010752",  
	   "installationMargin": 0,  
	   "isABP": false,  
	   "isClassC": false,  
	   "name": "3000000000010752",  
	   "relaxFCnt": false,  
	   "rx1DROffset": 0,  
	   "rx2DR": 0,  
	   "rxDelay": 0,  
	   "rxWindow": "RX1",  
	   "useApplicationSettings": true  
	 };

	var options = {
	    url: 'https://localhost:8080/api/nodes',
	    method: 'POST',
	    headers: headers,
	    body: dataString
     	    
	};

I post node with api like this source code but can’t register device node in network server.
Do i need to something for using api with that code?
I think authorization or secure problem.
Please Help this problem.

I don’t see any code that is making the actual API call in your example, could you share that too? Have you looked at the returned response? E.g. is there an error?

Yes i got this error message.

Error: undefined is not a valid uri or options object.
   at request (/home/binder/node_modules/request/index.js:45:11)
   at /home/binder/binder.js:153:1
   at Layer.handle [as handle_request] (/home/binder/node_modules/express/lib/router/layer.js:95:5)
   at next (/home/binder/node_modules/express/lib/router/route.js:137:13)
   at Route.dispatch (/binder/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/home/binder/node_modules/express/lib/router/layer.js:95:5)
   at /home/binder/node_modules/express/lib/router/index.js:281:22
   at Function.process_params (/home/binder/node_modules/express/lib/router/index.js:335:12)
   at next (/home/binder/node_modules/express/lib/router/index.js:275:10)
   at /home/binder/node_modules/body-parser/lib/read.js:130:5

Error: undefined is not a valid uri or options object.

That looks like an error related to your code, not to the LoRa App Server REST API.