@_helpers.positional(<NUM_LIT:1>)<EOL><INDENT>def step1_get_device_and_user_codes(self, http=None):<DEDENT>
if self.device_uri is None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>body = urllib.parse.urlencode({<EOL>'<STR_LIT>': self.client_id,<EOL>'<STR_LIT>': self.scope,<EOL>})<EOL>headers = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>if self.user_agent is not None:<EOL><INDENT>headers['<STR_LIT>'] = self.user_agent<EOL><DEDENT>if http is None:<EOL><INDENT>http = transport.get_http_object()<EOL><DEDENT>resp, content = transport.request(<EOL>http, self.device_uri, method='<STR_LIT:POST>', body=body, headers=headers)<EOL>content = _helpers._from_bytes(content)<EOL>if resp.status == http_client.OK:<EOL><INDENT>try:<EOL><INDENT>flow_info = json.loads(content)<EOL><DEDENT>except ValueError as exc:<EOL><INDENT>raise OAuth2DeviceCodeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(content, exc))<EOL><DEDENT>return DeviceFlowInfo.FromResponse(flow_info)<EOL><DEDENT>else:<EOL><INDENT>error_msg = '<STR_LIT>'.format(resp.status)<EOL>try:<EOL><INDENT>error_dict = json.loads(content)<EOL>if '<STR_LIT:error>' in error_dict:<EOL><INDENT>error_msg += '<STR_LIT>'.format(error_dict['<STR_LIT:error>'])<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>raise OAuth2DeviceCodeError(error_msg)<EOL><DEDENT>
Returns a user code and the verification URL where to enter it

        Returns:
            A user code as a string for the user to authorize the application
            An URL as a string where the user has to enter the code