Translate cURL HTTP POST to Lua ?

I don’t know anything about tinker - sorry. I just created a scene with the above code to call the Spark API. I don’t really even process a return other than checking the command was received…

Did you figure it out? Would be interested seeing code

I have a way to post via luup to your particle photon running Tinker. (Or in general)

the example below will call the function digitalwrite with D7 HIGH. replace function names and args to whatever you need.

local socket = require(‘socket’)
local https = require(‘ssl.https’)
local ltn12 = require(‘ltn12’)

https.TIMEOUT = 5

local body, code, headers, status = https.request(“https://api.particle.io/v1/devices/:(your_id)/digitalwrite","arg=D7,HIGH&access_token=:(your_token)”)