ngrok / ngrok-api-python

ngrok API client library for Python
MIT License
24 stars 14 forks source link

Ngrok unable to delete tunnel sessions #29

Open stikkireddy opened 7 months ago

stikkireddy commented 7 months ago

ngrok-api 0.10.0

if __name__ == "__main__":
    client = ngrok.Client("<token>")
    for ses in client.tunnel_sessions.list():
        client.tunnel_sessions.stop(ses.id)

ngrok.error.Error: (Error(...), 'You did not provide a Content-Type with your request. Please check your API client implementation and use one of the supported content types: https://ngrok.com/docs/api#content-types')

salilsub commented 4 months ago

@stikkireddy Is there a you are using the ngrok-api-python library instead of our python SDK? I'm curious if there's a capability you need that is in the former and not the latter.

stikkireddy commented 4 months ago

Hmm it was a while ago for my reason posting this I believe I was trying to delete any of my tunnels or list my tunnels from the rest api. I think the sdk only does tcp forwarding unless I am mistaken.