How to call Flush OTAA device nonces

Hello all, is there any way to implement this button on python script??

https://www.chirpstack.io/docs/chirpstack/api/api.html

Search for all instances of “flush”. The method is under DeviceService.

1 Like

For anyone that may need it

    # Connect without using TLS.
    channel = grpc.insecure_channel(server, options=(('grpc.enable_http_proxy', 0), ))

    # Device-queue API client.
    client = api.DeviceServiceStub(channel)

    # Define the API key meta-data.
    auth_token = [("authorization", "Bearer %s" % api_token)]

    # Construct request.
    req = api.FlushDevNoncesRequest()
    req.dev_eui = dev_eui

    _ = client.FlushDevNonces(req, metadata=auth_token)
1 Like