This is first time, I'm working on API and its really painful. I'd really appreciate if you can write code to authenticate. I'm sure, I can write GET, POST command thereafter.
The code is right there. Just look at my earlier post. The first two code blocks are the code that you should remove from your script. The last block is what you should add right after
$curl = curl_init($service_url);