Service Users#

Do not construct this object directly, instead access the service_users property of an ngrok.Client object.

class ngrok.services.ServiceUsersClient(client)[source]#
create(name='', active=None)[source]#

Create a new service user

Parameters:
  • name (str) – human-readable name used to identify the service

  • active (bool) – whether or not the service is active

https://ngrok.com/docs/api#api-service-users-create

Return type:

ServiceUser

delete(id)[source]#

Delete a service user by ID

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-service-users-delete

get(id)[source]#

Get the details of a Bot User by ID.

Parameters:

id (str) – a resource identifier

https://ngrok.com/docs/api#api-service-users-get

Return type:

ServiceUser

list(before_id=None, limit=None, filter=None)[source]#

List all service users in this account.

Parameters:
  • before_id (str) – Expects a resource ID as its input. Returns earlier entries in the result set, sorted by ID.

  • limit (str) – Constrains the number of results in the dataset. See the API Overview for details.

  • filter (str) – A CEL expression to filter the list results. Supports logical and comparison operators to match on fields such as id, metadata, created_at, and more. See ngrok API Filtering for syntax and field details: https://ngrok.com/docs/api/api-filtering.

https://ngrok.com/docs/api#api-service-users-list

Return type:

ServiceUserList

update(id, name=None, active=None)[source]#

Update attributes of a service user by ID.

Parameters:
  • id (str) –

  • name (str) – human-readable name used to identify the service

  • active (bool) – whether or not the service is active

https://ngrok.com/docs/api#api-service-users-update

Return type:

ServiceUser