Setting slot values

Hi, I am trying to set slot values from API but it is returning none every time. When I suppose to print the data from API, I can able to see the result.

Here is the code class ActionStoreUserData(Action):

def name(self) -> Text:

    return "action_store_userdata"

def run(self, dispatcher, tracker, domain):

    userid=tracker.sender_id       

    url='http://localhost/myapimethod'

    PARAMS = {'userid':userid}  

    r = requests.get(url,params=PARAMS)

    response = r.text  

    json_data= json.loads(response)          

    username = json_data["FullName"] 

    print("username",username)

    return [SlotSet("current_user", username)]

Hey, how do you query the API outside of python and what does the response look like? I suspect you probably need to do requests.get(..).json() instead

I can able to get result from API but i am returning like this return [SlotSet(“current_user”, username),SlotSet(“current_user”, username)].Is there any possible way to set multiple slots.

Not sure I understand the issue. Setting multiple slots is done in exactly that format [SlotSet(“first_slot”, value1),SlotSet(“second_slot”, value2)]