channel = grpc.insecure_channel(server)
client = api.GatewayServiceStub(channel)
auth_token = [(“authorization”, “Bearer %s” % api_token)]
gateway = api.GatewayServiceServicer()
gateway.Create()
I want to create a gateway using python but this create function is asking request and context parameters.kindly share some sample codes for this
There is not much difference between creating a gateway or enqueuing a downlink, please see this example:
https://www.chirpstack.io/docs/chirpstack/api/python-examples.html#enqueue_downlinkpy
However, you need to pass a CreateGatewayRequest
object to the Create
method. Please see:
https://www.chirpstack.io/docs/chirpstack/api/api.html#api-GatewayService
1 Like