def get_oauth_token ( ) : url = "{0}/token" . format ( DEFAULT_ORIGIN [ "Origin" ] ) r = s . get ( url = url ) return r . json ( ) [ "t" ]
python code to get refresh token on sandbox using oauth
Retrieve a simple OAuth Token for use with the local http client .
def get_oauth_token():
    """Retrieve a simple OAuth Token for use with the local http client."""
    url = "{0}/token".format(DEFAULT_ORIGIN["Origin"])
    r = s.get(url=url)
    return r.json()["t"]