How to Obtain a Refresh Token in OAuth
# support
a
@rahul1 Posting here as well, As per the documentation here https://www.medplum.com/docs/api/oauth/token we are not able to get the refresh token on login. “The refresh token - The token endpoint returns refresh_token only when the grant_type is authorization_code.” POST https://api.medplum.com/oauth2/token& Content-Type='application/x-www-form-urlencoded'& Authorization=Basic aSdxd892iujendek328uedj grant_type=authorization_code& client_id=492e4ec3-fb66-4b45-b529-599c708ec530&& code=AUTHORIZATION_CODE& redirect_uri=https://myclient/redirect HTTP/1.1 200 OK Content-Type: application/json { "access_token":"eyJz9sdfsdfsdfsd", "id_token":"dmcxd329ujdmkemkd349r", "token_type":"Bearer", "expires_in":3600 } So can you please help us understand how to get the refresh token from the token endpoint?
r
@ankityadav_94109 - To receive a refresh token, you'll need to include the "offline" scope during login. See this PR for more details: https://github.com/medplum/medplum/pull/1769