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

Channel id and admin rights? #48

Closed
kot7k opened this issue Apr 11, 2021 · 11 comments
Closed

Channel id and admin rights? #48

kot7k opened this issue Apr 11, 2021 · 11 comments

Comments

@kot7k
Copy link

kot7k commented Apr 11, 2021

Hi,
Maybe i'm just a noob cause i don't see anyone posting this question before but i'm having problems with the usage instructions.
Where do i find the channel id? i googled about it and found this:
Go to https://web.telegram.org
Click on your channel
Look at the URL and find the part that looks like c12112121212_17878787878787878
Remove the underscore and after c12112121212
Remove the prefixed letter 12112121212
Prefix with a -100 so -10012112121212
That's your channel id.

But i dont know if that steps are correct for this daemon to work. Can you tell me?
And next... i tried to use that steps to get channel id and the script gives me an error when i try to run it saying that i need admin rights on the channel. Is that true? do i need admin rights on a channel to be able to download from it using this daemon? cause if that's true then it's not what i was expecting from it.
Here is the error:
telethon.errors.rpcerrorlist.ChatAdminRequiredError: Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group (caused by SendMessageRequest)

EDIT: just saw Error #45 and the steps provided there to get channel id are the steps that im using right now. So i dont know whats wrong... Can you provide me an example of a call you are using (just with a some random channel id)

@phampyk
Copy link

phampyk commented Apr 11, 2021

Yes, the instructions for the channel ID are right.
And yes, you need admin permissions for the channel, only admins can send messages to the channel, and you need to forward the files to that channel, also the Daemon would send messages too so you need to have admin permissions

@alfem
Copy link
Owner

alfem commented Apr 11, 2021

Yes, as @phampyk said, you need you own channel (or admin permissions) in order to use this daemon.

It is not a bot you can add to a public channel to slurp any link posted.

@kot7k
Copy link
Author

kot7k commented Apr 11, 2021

So if i understand right, an example usage would be:
I create a channel and add it to my daemon.
I see links in my phone on other channels that i want to download and send them to my own channel.
Daemon will download them for me.

Is that right?

@alfem
Copy link
Owner

alfem commented Apr 11, 2021

That is absolutely right.

@maximko
Copy link

maximko commented Jun 3, 2022

Why you need to send a message to the channel? Is it a TG requirement? If not just ditch sendHelloMessage call.

@Ajwah
Copy link

Ajwah commented Sep 11, 2022

Why you need to send a message to the channel? Is it a TG requirement? If not just ditch sendHelloMessage call.

I had the same question and decided to make the assumption that the underlying Telegram API requires this somehow. I could not imagine that this invariant was baked into this daemon intentionally as a product feature.

As such, I pushed up a PR to clarify this point in the README.

@maximko
Copy link

maximko commented Sep 11, 2022

I don't think that's a limitation of tg api because telethon uses the same api as official clients and you can download any file from any channel using real clients. I suppose that this project just has different purpose. It isn't obvious from readme btw. For grabbing any files from any channels better to use Dineshkarthik/telegram_media_downloader

@EEB9
Copy link

EEB9 commented Aug 9, 2024

So if i understand right, an example usage would be: I create a channel and add it to my daemon. I see links in my phone on other channels that i want to download and send them to my own channel. Daemon will download them for me.

Is that right?

Did you find a way?

@phampyk
Copy link

phampyk commented Aug 12, 2024

So if i understand right, an example usage would be: I create a channel and add it to my daemon. I see links in my phone on other channels that i want to download and send them to my own channel. Daemon will download them for me.
Is that right?

Did you find a way?

A way to what?

@EEB9
Copy link

EEB9 commented Aug 13, 2024

So if i understand right, an example usage would be: I create a channel and add it to my daemon. I see links in my phone on other channels that i want to download and send them to my own channel. Daemon will download them for me.
Is that right?

Did you find a way?

A way to what?

A way to auto download without bullshit like needing admin privileges or having to send the message u wanna download to yourself?

@phampyk
Copy link

phampyk commented Aug 13, 2024

A way to auto download without bullshit like needing admin privileges or having to send the message u wanna download to yourself?

This script can't work without those requirements. They are needed for the script to work.

You don't send the message to yourself, you send it to the chat where the script is working. If you don't send the file how is it gonna know what file do you want?

The admin permission are for the script to be able to communicate with you what the percentage of download is down already, or if it failed for some reason or other errors.

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

No branches or pull requests

6 participants