Refresh token, how to get it with example

Hi, am Aamir and would like to know the procedure for getting refresh token. Trying following curl but getting bad request. would appreciate some input preferably with example.

curl -d “grant_type=password&username=abcd&1234” -H “Content-Type:application/x-www-form-urlencoded” -X POST https://api.thinger.io/oauth/token

where abcd is my username and 1234 my password