Page 1 of 1

PUT Request

Posted: Sun Jun 24, 2018 11:19 am
by TADS
Good Afternooon all,

Please can someone give me a example of a PUT request? i have seen a couple online but i can not seam to get any to work.... I am trying to create some app for my live streaming channel, below is what i am trying to use PUT for.

Here is the DEV link to the API: https://dev.streamelements.com

So the URL would be: https://api.streamelements.com/kappa/v2

the PUT i need is the following
Code: Select all
/points/{channel}/{user}/{amount}

Media type: application/json
so i understand the url in full if it was a get:
https://api.streamelements.com/kappa/v2/points/channe id removed/tads_gaming

That gives me my points on a selected channel but to add or remove points it has to be a PUT and i have no idea on how to use it, so if anyone could give me some example of the above i could learn from it and do all the other requests myself

Many Thanks for your time

Kev (TADS)

PS: glad to be back!

Re: PUT Request

Posted: Mon Jun 25, 2018 5:53 pm
by CodenStuff
I would try using CURL in PHP to do this. It is quite simple to understand and use and should do what you need.

I'm unable to go into detail with this at the moment due to being out and about but I'll be home soon if you need help. Until then I think sitepoint has a good tutorial on this:

https://www.sitepoint.com/using-curl-fo ... -requests/

Hope this helps :)

Re: PUT Request

Posted: Thu Jun 28, 2018 12:09 pm
by TADS
Sorry i didn't reply sooner... yes i did work it out in the end, it was user error on my part... i didn't use the auth key i had that is why i was getting a null response.

TADS