Can't call student's Particle functions via the web, only in the console

I'm sure there is a perfectly simple explanation for this ... my students did an assignment where they had to enter a string of notes and play it. I can trigger the relevant Particle functions on the console, but not via the web. I created a new access token just for this assignment, but that didn't work. I've tried using both the name and hex value for the device ID, that didn't work either. In both Safari and Chrome I get nada. At least one student showed a video of their code working, so it must be on my end. Any ideas?

<h2>Enter Note Sequence / BPM:</h2>

<form method="POST" action="https://api.particle.io/v1/devices/THIS_IS_MY_ID/setTempo">
    Beats per minute: <input type="text" size="10" name="args"/> <br>
    <input type="submit" value="Set BPM"/>
    <input type="hidden" name="access_token" value="THIS_IS_MY_ACCESS_TOKEN">
</form>

<form method="POST" action="https://api.particle.io/v1/devices/THIS_IS_MY_ID/PlayIt">
    Note sequence: <input type="text" size="10" name="args"/><br>
    <input type="submit" value="Play It!"/>
    <input type="hidden" name="access_token" value="THIS_IS_MY_ACCESS_TOKEN"/>
</form>

I believe the problem is that the call a function requires arg (singular) not args in the request.

Thanks for your reply @rickkas7, I really do appreciate it! I had asked about this very topic before on this forum, and apparently the choice is arbitrary.

I just tried it now, with arg, args, and fred, and they did indeed all work. [Also, if this hadn't worked, I would've been besieged with questions from students.]

So I think there might've been something glitching on your end or my end yesterday.

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