How I can pass jwt token with each msg request and get it into using REST integration

Hi Using REST I have integrated chatbot with website.for fetching data from API I require jwt token so with each msg request I want to send it ,so How I can do this and get it into file ? I tried with adding metadata but in let me know what I’m doing wrong


function send(message) {

    url: "http://localhost:5005/webhooks/rest/webhook",

	type: "POST",
	contentType: "application/json",
	data: JSON.stringify({ message: message, sender: user_id, metadata:{"tokn":123456} }),
	success: function (botResponse, status) {
		console.log("Response from Rasa: ", botResponse, "\nStatus: ", status);

def extract_metadata_from_tracker(tracker):

events = tracker.current_state()['events']
user_events = []
for e in events:
    if e['event'] == 'user':

return user_events[-1]['metadata']

class ActionHello(Action):

def name(self) -> Text:
    return "action_hello"

def run(self, dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
    metadata = extract_metadata_from_tracker(tracker)

    print("MetaData: ", metadata)
    dispatcher.utter_message(text="Hello World!")

    return []




Thanks in advance