It possible to use API for developing feature WIFI login in Mobile Application

Hi there,
I would like to know about API details are as info below;

  1. Is there any API for developing feature WIFI login in Mobile Application? (Force user to login wifi via Mobile application both Android and iOS)
  2. Can we set session time to use WIFI via API?

Thank you