Invalid Token time

smartapp

(Nethram) #1

I’m using samsung web service app https://graph.api.smartthings.com/ and trying to get a valid token for a period of time through this api
http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/tutorial-part2.html?highlight=token
but, I’m getting invalid expiry time . So, please provide me a better way to solve this issue.

here, Is the request for getting token.

Request: https://graph.api.smartthings.com/oauth/token?grant_type=authorization_code&code=code&client_id=client_id&client_secret=client_secret&redirect_uri= (https://graph.api.smartthings.com/oauth/token?grant_type=authorization_code&code=’.$code.’&client_id=’.$client_id.’&client_secret=’.$client_secret.’&redirect_uri=’.urlencode($redirect_url)) smartthings.videoconf.me/handler/code (https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id=client_id&scope=app&redirect_uri=smartthings.videoconf.me/handler/code) .
requested time is 1532425476

Response: [expiry_time] => 1529452800
[value] => 4fc4f545-70d2-4a5e-81f6-26c673f6e7ba.