passwordlessSMS :: T.Text -> Config -> ExceptT T.Text IO RespSMS
passwordlessSMS number Config{..} = do
  resp <- liftIO $ post (T.unpack $ basePath <> "/passwordless/start") requestParams
  case AE.eitherDecode (resp ^. responseBody) of
    (Left err)  -> throwError $ T.pack $ show err
    (Right tok) -> return tok
  where 
    requestParams =
      [ "client_id"    :=  clientId  
      , "connection"   :=  ("sms" :: T.Text)
      , "phone_number" :=  number
      ]
passwordlessSMS :: T.Text -> Config -> ExceptT T.Text IO RespSMS
passwordlessSMS number Config{..} = do
  resp <- liftIO $ post (T.unpack $ basePath <> "/passwordless/start") requestParams
  case AE.eitherDecode (resp ^. responseBody) of
    (Left err)  -> throwError $ T.pack $ show err
    (Right tok) -> return tok
  where 
    requestParams =
      [ "client_id"    :=  clientId  
      , "connection"   :=  ("sms" :: T.Text)
      , "phone_number" :=  number
      ]
passwordlessSMS number Config{..} = do
  resp <- liftIO $ post (T.unpack $ basePath <> "/passwordless/start") requestParams
  case AE.eitherDecode (resp ^. responseBody) of
    (Left err)  -> throwError $ T.pack $ show err
    (Right tok) -> return tok
  where 
    requestParams =
      [ "client_id"    :=  clientId  
      , "connection"   :=  ("sms" :: T.Text)
      , "phone_number" :=  number
      ]