Trongate Docs
switch to dark modeswitch to dark mode
ID Based Authorization

ID Based Authorization

ID Based Authorization allows access based upon a user's Trongate User ID.  With ID Based Authorization, you can protect your endpoints by making them accessible only for users whose trongate_user_id has been granted permission.

Did You Know?
The 'Trongate User ID' is actually the 'id' value, taken from the 'trongate_users' database table.  Read How Trongate's Token System Works for more information.

The syntax for ID based authorization is:

"authorization": {
    "userIds": []

As you can see, from the square brackets, the 'userIds' property is expecting an array.  This means that our goal would be to pass in an array of users who would be allowed access to the endpoint.  To be clear, we'd be passing in the Trongate User IDs for the allowed users.

Below is an example of a 'Get' endpoint where access has been granted to the following two users:

  • a user with a Trongate User ID of 77
  • a user with a Trongate User ID of 88

"Get": {
    "url_segments": "api/get/members",
    "request_type": "GET",
    "description": "Fetch rows from table",
    "enableParams": true,
         "userIds": [77,88]


If you have a question or a comment relating to anything you've see here, please goto the Help Bar.