Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL validation failed. Try again later. #63

Open
bfenty opened this issue Dec 8, 2022 · 7 comments · May be fixed by #64 or #67
Open

URL validation failed. Try again later. #63

bfenty opened this issue Dec 8, 2022 · 7 comments · May be fixed by #64 or #67

Comments

@bfenty
Copy link

bfenty commented Dec 8, 2022

Version of the custom_component

[v0.8.4]

Describe the bug

Sets up in HA correctly, seems to connect to Zoom ok. However, Zoom says I cannot activate the app without Event Notification Endpoint Validation, and I cannot get it to validate. I am using the Nabu Casa URL, it ends in ui.nabu.casa/api/zoom. I believe I am not getting any notifications because the app is not 'active'.

@bfenty
Copy link
Author

bfenty commented Dec 8, 2022

For more context, I checked logs and I'm also getting an error from within HA.

Logger: aiohttp.server
Source: helpers/config_entry_oauth2_flow.py:205
First occurred: 3:51:16 PM (1 occurrences)
Last logged: 3:51:16 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 171, in get
    return await super().get(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 96, in get
    result = await self._flow_mgr.async_configure(flow_id)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 281, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 303, in async_step_creation
    token = await self.flow_impl.async_resolve_external_data(self.external_data)
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 169, in async_resolve_external_data
    return await self._token_request(
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 205, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://zoom.us/oauth/token')

@raman325
Copy link
Owner

I switched companies and no longer use Zoom. As such I have limited capacity to fix bugs. I will add a note to the README but would welcome contributions to keep this integration working.

@genebean
Copy link

It seems the issue stems from Zoom requiring webhook events to be verified now. https://marketplace.zoom.us/docs/api-reference/webhook-reference/#verify-webhook-events They are removing the Verification token and using a Secret Token now. I was able to connect the integration by passing in the Secret Token instead but it seems the validation process wanted on the Features screen in the Zoom dev area needs what is talked about in that URL. My logs show this (line breaks added for readability):

Received unauthorized request: 
{"payload":{
  "plainToken":"<redacted manually>"},
  "event_ts":1670946927462,
  "event":"endpoint.url_validation"
} (Headers: 
  <CIMultiDictProxy('x-zm-signature': 'v0=cdb51105c40b072d7f53eaf01771ade2cbbc10b697483bf20ca5e92c3851b871', 
  'Authorization': '<redacted manually>',
  'x-zm-request-timestamp': '1670946927', 
  'Content-Type': 'application/json; charset=utf-8', 
  'Content-Length': '110', 
  'Host': '<redacted manually>.ui.nabu.casa', 
  'Connection': 'Keep-Alive', 
  'User-Agent': 'Zoom Marketplace/1.0a')>)

willscott added a commit to willscott/ha-zoom-automation that referenced this issue Jan 2, 2023
@willscott willscott linked a pull request Jan 2, 2023 that will close this issue
@Normanras
Copy link
Contributor

For what it's worth @bfenty - I got the same error but was still able to complete the setup and have connected it to HA successfully.

@bfenty
Copy link
Author

bfenty commented Jun 26, 2023

For what it's worth @bfenty - I got the same error but was still able to complete the setup and have connected it to HA successfully.

Thanks for the reply. It actually did start working for a bit then it has quit again.

@Normanras
Copy link
Contributor

@bfenty Did you try validating the URL after the integration was setup and working in Home Assistant? That seemed to work for me, too.

@ChristopherJacob
Copy link

I think this issue is related to the challenge-response checks from zoom. There is an initial validation and then revalidation.

https://developers.zoom.us/docs/api/rest/webhook-reference/#validate-your-webhook-endpoint

Having the same issues as described above. It works for a bit, when the revalidation happens, there is nothing to handle it so zoom just stops sending updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants