# Need a nudge in the right direction with msg.params

**URL:** <https://discourse.nodered.org/t/need-a-nudge-in-the-right-direction-with-msg-params/44890>\
**Category:** General\
**Created:** [28 April 2021 19:57 UTC](https://discourse.nodered.org/t/need-a-nudge-in-the-right-direction-with-msg-params/44890 "2021-04-28T19:57:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendonhatcher](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@brendonhatcher](https://discourse.nodered.org/u/brendonhatcher)\
**Post date:** [28 April 2021 19:57 UTC](https://discourse.nodered.org/t/need-a-nudge-in-the-right-direction-with-msg-params/44890/1 "2021-04-28T19:57:19Z")

</div>

Hi

I am using the Spotify node, and having a lot of fun!

I have simple nodes - play, pause, skip working.  
Now I need to use the node with some additional input parameters.  
I have found the documentation at the bottom of this page: [GitHub - pckhib/node-red-contrib-spotify: Node-RED node for Spotify Web API](https://github.com/pckhib/node-red-contrib-spotify)

I understand what the doc is telling me to do, and how it relates to my goals, but I lack the detailed knowledge to actually do it!

I know I need an inject node to contain the arguments and pass them to the spotify node. I know where to find the parameters in the spotify api documentation. I just don't know how to add a msg.params object, and how to format it.

I would appreciate some gap-filler.

Thanks  
Brendon

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2021 20:03 UTC](https://discourse.nodered.org/t/need-a-nudge-in-the-right-direction-with-msg-params/44890/2 "2021-04-28T20:03:34Z")

</div>

You can simply add a function node and enter the code example...

```auto
// API function: getArtistAlbums
msg.params = [
    '43ZHCT0cAZBISjO8DG9PnE', /* Artist ID */
    { limit: 10, offset: 20 } /* Options */
];

```

Trigger it by whatever you want (an inject for example)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 June 2021 20:04 UTC](https://discourse.nodered.org/t/need-a-nudge-in-the-right-direction-with-msg-params/44890/3 "2021-06-27T20:04:09Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
