To obtain a refresh token, first make sure that all the requirements are met, and then follow the instructions provided to create the token.
Requirements for Generating a Refresh Token
Creating the Refresh Token