question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect URL for stopping admin directory channel

See original GitHub issue

Hey there!

The URL for stopping a directory channel is documented as: POST https://www.googleapis.com/admin/directory_v1/channels/stop

but the library is using something else: POST https://www.googleapis.com/admin/directory/v1/admin/directory_v1/channels/stop

Until today, this “incorrect” URL in the library was actually working, but now requests are failing with a 404! Maybe someone “fixed” this strange inconsistency in the backend?

Testing manually, the documented URL does appear to work correctly while the library URL does not.

Specifying the correct URL in the options arg gets it working again, e.g.

await directory.channels.stop(
  {
    auth,
    resource: {
      id,
      resourceId
    }
  },
  {
    url: "https://www.googleapis.com/admin/directory_v1/channels/stop"
  }
);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lucasharroncommented, Jun 28, 2019

Thanks @jacobpgn. My apologies, the workaround you listed should work well for me!

0reactions
jacobpgncommented, Jun 28, 2019

Hey @lucascdsilva – my original comment above includes a workaround!

I don’t think there are any alternative libraries unless you use an HTTP lib to make the request yourself, and it seems unlikely that this issue will be fixed soon (apparently there have been several issues with these paths for many years)

Hopefully the example above will work for you though 😀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Admin Directory v1 service does not construct the correct url ...
This is happening across multiple languages (i.e. the same incorrect URL is being generated by multiple independent code generators). (See ...
Read more >
Trying to stop Google Directory API push notifications with a ...
The wrong/right URL is: https://www.googleapis.com/admin/reports_v1/channels/stop. And the Scope to use this URL is:.
Read more >
Push Notifications | Admin console - Google Developers
A channel specifies routing information for notification messages. As part of the channel setup, you identify the specific URL where you want to...
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
Read this tutorial and learn 8 methods to fix this problem. ... set up to disallow directory browsing to prevent attackers from accessing...
Read more >
OWA redirection doesn't work after installing November 2021 ...
When a user who has an Exchange Online mailbox logs in to OWA on-premises, they receive a redirect URL that points them to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found