def get_oauth_token(oauth_key, oauth_secret, username, password, useragent=_DEFAULT_USERAGENT, script_key=None):
	"""
	Gets an OAuth token from Reddit or returns a valid locally stored token.
	Because the retrieved token is stored on the file system (script_key is used to distinguish between files), this function is safe
	to call across multiple instances or runs. The token is renewed after one hour.
	This function can be used without PRAW.
	
	Note: Only script-based oauth is supported.
	
	:param oauth_key:		Reddit oauth key
	:param oauth_secret: 	Reddit oauth secret
	:param username: 		Reddit username
	:param password: 		Reddit password
	:param useragent: 		Connection useragent (this should be changed, otherwise you'll be heavily rate limited)
	:param script_key: 		Key used to distinguish between local token files
	
	:return: An OAuth token if one could be retrieved, otherwise None.
	"""
	token = _get_local_token(script_key, username)
	if token is None:
		token_time = _time_ms()
		token = _request_oauth_token(oauth_key, oauth_secret, username, password, useragent=useragent)
		write_config(token, token_time, _get_config_file(script_key, username))
	return token