code: def send_messages(self, messages, timeout):
          
          data = {
              'assignment': self.assignment.endpoint,
              'messages': messages,
              'submit': self.args.submit
          }
          address = self.API_ENDPOINT
          address_params = {
              'client_name': 'ok-client',
              'client_version': client.__version__,
          }
          log.info('Sending messages to %s', address)
          try:
              response = requests.post(address,
                  params=address_params, json=data, timeout=timeout)
              response.raise_for_status()
              return response.json()['url']
          except (requests.exceptions.RequestException, requests.exceptions.BaseHTTPError, ValueError) as ex:
              log.warning('%s: %s', ex.__class__.__name__, str(ex))
          return
docs: Send messages to server, along with user authentication.