HTTP Post command

Hi everyone,
I have a HTTP Post code
POST /oauth/token HTTP/1.1
Host: api.spark.io
Authorization: Basic c3Bhcms6c3Bhcms=
Content-Type: application/x-www-form-urlencoded

grant_type=password&username=zac@example.com&password=A3ddj3w
But i dont know how to use it in App Inventor
Please help me
Thanks

POST requests are a bit tricky on the App Inventor; you have to build lists of lists for the headers and data that you send with the post. Something like this has worked for me,

Notice that I’ve changed spark to particle, and the base64 encoded text sent with the authorization is for particle:particle rather than spark:spark (which is what c3Bhcms6c3Bhcms= is).

3 Likes

yeah, i got it
Thank you