POST tp/token

Returns an OAuth2 access token

Resource URL

POST https://api.indoona.com/tp/token.json

Parameters

name description
grant_type Can be "client_credentials", "authorization_code", "refresh_token"
client_id the Application's client id
client_secret the Application's client secret
code the authorization code received from the indoona Authorization Server (only if grant_type = “authorization_code”)
refresh_token the user’s refresh token (only if grant_type = “refresh_token”)
redirect_uri same parameter as specified at App creation stage (only if grant_type = “authorization_code”)

Example


	POST https://api.indoona.com/tp/token
	Content-Type=application/x-www-form-urlencoded

	grant_type=authorization_code&code=c7f10f95913d8782a7b958c31485ac6bfd54a983&client_id=5439096a1c67819660e732c54xaYnu&client_secret=aDKwNXjC7lWOFH0p&redirect_uri=http://appdomain/indoona/redirect

	Response
	{
		"access_token": "f66907b18c304d9a226cbbe1c128c8164e19ff01",
		"expires_in": 36000,
		"token_type": "Bearer",
		"scope": "basic user_phone",
		"refresh_token": "b256ba34db4d1dcbeb4080ecac7fde3eb4601caa",
		"user_id": "1i7qr9t0dxc0kiw8u4fmzx69f"
	}