Can't create OAuth 2.0 client


Could you help me to create OAuth 2.0 client.
I develop applications that allows users to manage entities (applications, gateways, and devices) on TTN.
I use the OAuth 2.0 protocol to achieve this.
According to the documentation (Authentication | The Things Stack for LoRaWAN) I first need to register the OAuth client.

I am trying to use TTN CLI command:

ttn-lw-cli clients create tektelic-ttn-test-integration --description "Oauth client for integration Tektelic LeapX application with TTN" --redirect-uris "" --rights "RIGHT_APPLICATION_ALL,RIGHT_GATEWAY_ALL," --grants "GRANT_AUTHORIZATION_CODE"

But I got an error:

cmd / ttn-lw-cli / commands: no_collaborator (no collaborator set)

Could you tell what could be the reason for this error and how can I resolve it?

You’re almost there. You just need to indicate which user or organization will own the OAuth client. I’d recommend to put it under your organization, not your personal user account.

Here’s how registered the OAuth client for my “gateway manager app”:

$ ttn-lw-cli clients create \
    --client-id mybrand-gateway-manager \
    --name "MyBrand Gateway Manager" \
    --description "Manage your MyBrand gateway from the mobile app" \
    --organization-id mybrand \ # or --user-id htdvisser \
    --redirect-uris \
1 Like