# Setting slot values

**URL:** <https://forum.rasa.com/t/setting-slot-values/27643>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [April 17, 2020, 9:41am UTC](https://forum.rasa.com/t/setting-slot-values/27643 "2020-04-17T09:41:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saranya96](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Saranya96](https://forum.rasa.com/u/Saranya96)\
**Post date:** [April 17, 2020, 9:41am UTC](https://forum.rasa.com/t/setting-slot-values/27643/1 "2020-04-17T09:41:38Z")

</div>

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)]
```

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [April 17, 2020, 11:15am UTC](https://forum.rasa.com/t/setting-slot-values/27643/2 "2020-04-17T11:15:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Saranya96](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Saranya96](https://forum.rasa.com/u/Saranya96)\
**Post date:** [April 17, 2020, 1:28pm UTC](https://forum.rasa.com/t/setting-slot-values/27643/3 "2020-04-17T13:28:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [April 17, 2020, 3:15pm UTC](https://forum.rasa.com/t/setting-slot-values/27643/4 "2020-04-17T15:15:23Z")

</div>

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