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

How connect to coturn using RestApi #1275

Open
gulivero1773 opened this issue Sep 29, 2023 · 8 comments
Open

How connect to coturn using RestApi #1275

gulivero1773 opened this issue Sep 29, 2023 · 8 comments
Assignees
Labels

Comments

@gulivero1773
Copy link

How enable and connect to coturn using Rest?
I don't understand what I need to add in turnserver.conf for use rest request. Where host and port for rest?

@eakraly
Copy link
Collaborator

eakraly commented Sep 30, 2023

Hi @gulivero1773

"TURN REST API" means special configuration to enable WebRTC compatible setup
See description for the flag:

--use-auth-secret TURN REST API flag. Flag that sets a special WebRTC authorization option that is based upon authentication secret. This feature purpose is to support "TURN Server REST API" as described in [TURN REST API](https://github.com/coturn/coturn/blob/master/README.turnserver#L679) in the docs. This option is used with long-term credentials mechanism.

It is not what is commonly referred to as "REST API" where you can perform actions on the API endpoint using REST HTTP - coturn does not have that control (and does not need to)

@eakraly eakraly self-assigned this Sep 30, 2023
@gulivero1773
Copy link
Author

gulivero1773 commented Oct 2, 2023

Help me what domain I need to use for send request for connect coturn? My turnserver.conf and I send 127.0.0.1:3478?service=turn&username=username&key=password&realm=127.0.0.1
turnserver.conf.zip

@gulivero1773
Copy link
Author

Знімок екрана 2023-10-02 о 14 54 39 And I Have this error

@eakraly
Copy link
Collaborator

eakraly commented Oct 4, 2023

@gulivero1773 what client are you using to connect? It looks like you are using HTTP...
But TURN is not HTTP - you need to use TURN client

@alexchow94
Copy link

@eakraly , Hello, I am also trying to enable the same and I am running the turnserver with use-auth-secret and static-auth-secret.
Can you help me how to verify this setup using TURN client? Is there a TURN client tool available?
Thanks.

@eakraly
Copy link
Collaborator

eakraly commented Oct 19, 2023

@alexchow94
Copy link

Thanks @eakraly, I was able to verify with turnutils with below command
turnutils -T -u timestamp:user -w -p <port_no>

@GiantKs
Copy link

GiantKs commented Mar 25, 2024

I have the same problem

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

No branches or pull requests

4 participants