NAV Navbar
shell php
  • Introduction
  • Authentication
  • Authorization
  • Rate Limits
  • Error Codes
  • Resource Types
  • Addons
  • Teams
  • Users
  • Introduction

    Welcome to the Gmodstore API! You can use our API to access Gmodstore API endpoints, which can be used interact with Gmodstore programmatically.

    We have language bindings in PHP! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    Authentication

    To authenticate, use this code:

    # With shell, you can just pass the correct header with each request
    curl "https://api.gmodstore.com/v2/<endpoint>" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    

    Make sure to replace secret with your API key.

    The Gmodstore provides to methods of authentication: bearer token and query parameter. Whilst the former is preferred, you may still wish to use the latter, to do do so simply pass a query variable named api_key containing your API key. If you wish to use a former simply set the Authorization header to Bearer <api_key> where <api_key> is your API key.

    Authorization

    For authorization Gmodstore uses a variety of permissions which you can assign to your api keys individually. An up-to-date list of these permissions is available on your Gmodstore dasboard.

    Rate Limits

    Every request you make to the Gmodstore API will count against your rate limit which, as of the time of writing, is 60 requests / minute.
    An up-to-date value will always provided in the X-RateLimit-Limit header.
    The number of requests you have remaining before you must wait is provided in the x-RateLimit-Remaining header.

    Error Codes

    The Gmodstore API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your API key is missing or wrong.
    403 Forbidden -- The kitten requested is hidden for administrators only.
    404 Not Found -- The specified kitten could not be found.
    405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
    429 Too Many Requests -- You're requesting too many resources! Slow down!
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

    Resource Types

    Resources are always returned from the API in the format to the right (JSON Schema)

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "data": {
          "type": ["array", "object"]
        }
      },
      "required": [
        "data"
      ]
    }
    

    Some resources have an "Relations" section, these relations can be retrieved by using the with query parameter; for example, to retrieve the user relation one could append ?with=user to the resources URL, this is done to save bandwidth. To retrieve multiple relations simply pass a comma delimited list of names, e.g ?with=user,transaction would retrieve both the user and transaction relationships of the given resource (provided it had those relations). The relations will be appended to the resource with a key matching matching their name(s).

    Finally you should be aware that all JSON Schemas are represented as JSON Schema.

    Collection

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "array",
      "items": {
        "type": "object"
      }
    }
    

    A generic collection of resources, most resources use this collection type but some may have special ones. In this type of collection all resource properties are maintained and they are placed in an array.

    Addon

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "active": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "short_description": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "requirements": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "price": {
          "type": "object",
          "properties": {
            "original": {
              "type": "number",
              "minimum": 0,
              "exclusiveMinimum": true
            },
            "purchase": {
              "type": "number",
              "minimum": "original",
              "exclusiveMinimum": true
            }
          },
          "required": [
            "original",
            "purchase"
          ]
        },
        "images": {
          "type": "object",
          "properties": {
            "bigspot": {
              "type": "string",
              "format": "uri"
            },
            "listing": {
              "type": "string",
              "format": "uri"
            },
            "listing_small": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "bigspot",
            "listing",
            "listing_small"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "active",
        "name",
        "short_description",
        "description",
        "requirements",
        "price",
        "images",
        "created_at",
        "updated_at"
      ]
    }
    

    The Addon resource is used to represent an addon.

    Relations

    Name Type Description
    latest_version Addon Version The latest version of the addon
    team Team The team that owns the addon

    Addon Coupon

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "code": {
          "type": "string"
        },
        "percent": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "exclusiveMinimum": true,
          "exclusiveMaximum": true
        },
        "max_uses": {
          "type": "integer",
          "minimum": 0
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "integer",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "code",
        "percent",
        "max_uses",
        "expires_at",
        "created_at",
        "updated_at"
      ]
    }
    

    The Addon Coupon resource is used to represent a coupon for an addon

    Relations

    Name Type Description
    addon Addon The addon the coupon can be used with

    Addon Download

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "url"
      ]
    }
    

    The Addon Download resource is used as a container for a url which points to the Download Server, when a GET request is sent to the url the download server will serve the addon file.

    NOTE: The url is valid for a single use ONLY!

    Addon Media

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "type",
        "title"
      ]
    }
    

    The Addon Media resource is used to represent a media object belonging to an addon.

    Note: The "ID" of this resource is a unique hash

    Relations

    Name Type Description
    addon Addon The addon the media is for

    Addon Purchase

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "revoked": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "revoked",
        "created_at",
        "updated_at"
      ]
    }
    

    The Addon Purchase resource is used to represent ownership of an addon.

    Relations

    Name Type Description
    addon Addon The addon the "purchase" is of
    transaction Transaction The transaction (null if the "purchase" was granted)
    user User The user that the "purchase" belongs to

    Addon Review

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "title": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "body": {
          "type": "string"
        },
        "rating": {
          "type": "number",
          "minimum": 0,
          "maximum": 5,
          "exclusiveMinimum": true
        }
      },
      "required": [
        "id",
        "title",
        "version",
        "body",
        "rating"
      ]
    }
    

    The Addon Review resource is used to represent a review of an addon.

    Relations

    Name Type Description
    addon Addon The addon the review is for
    author User The author of the review

    Addon Version

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string"
        },
        "changelog": {
          "type": "string"
        },
        "file_hash": {
          "type": "string"
        },
        "file_size": {
          "type": "integer",
          "minimum": 0
        },
        "created_at": {
          "type": "string",
           "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "name",
        "changelog",
        "file_hash",
        "file_size",
        "created_at",
        "updated_at"
      ]
    }
    

    The Addon Version resource is used to represent a specific version of an addon.

    Relations

    Name Type Description
    addon Addon The addon the version is of

    Permission Group

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title"
      ]
    }
    

    The Permission Group resource is used to represent a permission group / rank / role.

    Team

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "name",
        "created_at",
        "updated_at"
      ]
    }
    

    The Team resource is used to represent a team.

    Relations

    Name Type Description
    primary_author Team User The primary owner of the team

    Team User

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "team_id": {
          "type": "integer",
          "minimum": 1
        },
        "primary": {
          "type": "boolean"
        }
      },
      "required": [
        "team_id",
        "primary"
      ]
    }
    

    The Team User resource is used to represent a member of a team, it acts as a link between a real User and a team.

    Relations

    Name Type Description
    user User The user this team user represents

    Transaction

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "price": {
          "type": "number",
          "minimum": 0,
          "exclusiveMinimum": true
        },
        "refunded": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "price",
        "refunded"
      ]
    }
    

    The Transaction resource is used to represent a transaction.

    Relations

    Name Type Description
    user User The user

    User

    JSON Schema:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string"
        },
        "avatar": {
          "type": "string",
          "format": "uri"
        },
        "country_code": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "avatar",
        "country_code"
      ]
    }
    

    The User resource is used to represent a user on the site.

    Addons

    Main

    Index

    curl "https://api.gmodstore.com/v2/addons" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddons();
    

    This endpoint requires the addons.read permission

    Fetch all the addons that you have access to.

    GET https://api.gmodstore.com/v2/addons

    Response code: 200
    Response resource: Collection<Addon>

    Show

    curl "https://api.gmodstore.com/v2/addons/565" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565);
    

    This endpoint requires the addons.read permission

    Fetch a single addon.

    GET https://api.gmodstore.com/v2/addons/<id>

    Route parameters:

    Parameter Type Description
    id integer The id of the addon to fetch

    Response code: 200
    Response resource: Addon

    Coupons

    Index

    curl "https://api.gmodstore.com/v2/addons/565/coupons" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getCoupons();
    

    This endpoint requires the addons.coupons.read permission

    Fetch all the coupons for an addon.

    GET https://api.gmodstore.com/v2/addons/<id>/coupons

    Route parameters:

    Name Type Description
    id Integer The id of the addon to fetch the coupons of

    Response code: 200
    Response resource: Collection<Addon Coupon>

    Store

    curl -X POST "https://api.gmodstore.com/v2/addons/565/coupons" \
      -H "Authorization: Bearer secret" \
      -d "percent=25&code=25OFF&max_uses=10&expires_at=25.12.2025"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->createCoupon([
      'percent' => 25,
      'code' => '25OFF',
      'max_uses' => 10,
      'expires_at' => '25.12.2025'
    ]);
    

    This endpoint requires the addons.coupons.write permission

    Create an addon coupon.

    POST https://api.gmodstore.com/v2/addons/<id>/coupons

    Route parameters:

    Name Type Description
    id Integer The id of the addon to create the coupon for

    Form fields:

    Name Type Description
    percent Integer The percentage discount
    code String The code for the coupon
    max_uses Integer The maximum number of uses for
    expires_at Date (d.m.Y) The expiry date (null for infinite)

    Response code: 201
    Response resource: Addon Coupon

    Show

    curl "https://api.gmodstore.com/v2/addons/565/coupons/967" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getCoupon(967);
    

    This endpoint requires the addons.coupons.read permission

    Fetch an addon's coupon.

    GET https://api.gmodstore.com/v2/addons/<addon_id>/coupons/<coupon_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the coupon belongs to
    coupon_id Integer The id of the coupon to fetch

    Response code: 200
    Response resource: Addon Coupon

    Update

    curl -X PUT "https://api.gmodstore.com/v2/addons/565/coupons/967" \
      -H "Authorization: Bearer secret" \
      -d "percent=75&code=75OFF&max_uses=10&expires_at=25.12.2025"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getCoupon(967)->update([
      'percent' => 75,
      'code' => '75OFF'
    ]);
    

    This endpoint requires the addons.coupons.write permission

    Update an addon's coupon.

    PUT https://api.gmodstore.com/v2/addons/<addon_id>/coupons/<coupon_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the coupon belongs to
    coupon_id Integer The id of the coupon to update

    Form fields:

    Name Type Description
    percent Integer The percentage discount
    code String The code for the coupon
    max_uses Integer The maximum number of uses for
    expires_at Date (d.m.Y) The expiry date (null for infinite)

    Response code: 200
    Response resource: Addon Coupon

    Destroy

    curl -X DELETE "https://api.gmodstore.com/v2/addons/565/coupons/967" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getCoupon(967)->delete();
    

    This endpoint requires the addons.coupons.write permission

    Destroy an addon's coupon.

    DELETE https://api.gmodstore.com/v2/addons/<addon_id>/coupons/<coupon_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the coupon belongs to
    coupon_id Integer The id of the coupon to destroy

    Response code: 204

    Purchases

    Index

    curl "https://api.gmodstore.com/v2/addons/565/purchases" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getPurchases();
    

    This endpoint requires the addons.purchases.read permission

    Fetch all purchases of an addon.

    GET https://api.gmodstore.com/v2/addons/<id>/purchases

    Route parameters:

    Name Type Description
    id Integer The id of the addon to fetch the purchases of

    Response code: 200
    Response resource: Collection<Addon Purchase>

    Store

    curl -X POST "https://api.gmodstore.com/v2/addons/565/purchases" \
      -H "Authorization: Bearer secret" \
      -d "user_id=76561198127820866"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->addPurchase(76561198127820866);
    

    This endpoint requires the addons.purchases.write permission

    Create a purchase for an addon.

    POST https://api.gmodstore.com/v2/addons/<id>/purchases

    Route parameters:

    Name Type Description
    id Integer The id of the addon to create the purchase for

    Form fields:

    Name Type Description
    user_id Integer The id of the user to create the purchase for

    Response code: 201
    Response resource: Addon Purchase

    Show

    curl "https://api.gmodstore.com/v2/addons/565/purchases/76561198091472117" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getPurchase(76561198091472117);
    

    This endpoint requires the addons.purchases.read permission

    Get a purchase of an addon (by user).

    GET https://api.gmodstore.com/v2/addons/<addon_id>/purchases/<user_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the purchase belongs to
    user_id Integer The id of the user who made the purchase

    Response code: 200
    Response resource: Addon Purchase

    Update

    curl -X POST "https://api.gmodstore.com/v2/addons/565/purchases/76561198091472117" \
      -H "Authorization: Bearer secret" \
      -d "revoked=1"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getPurchase(76561198127820866)->update([
      'revoked' => true
    ]);
    

    This endpoint requires the addons.purchases.write permission

    Create a purchase for an addon.

    POST https://api.gmodstore.com/v2/addons/<id>/purchases

    Route parameters:

    Name Type Description
    id Integer The id of the addon to create the purchase for

    Form fields:

    Name Type Description
    revoked Boolean Whether or not the purchase is revoked

    Response code: 201
    Response resource: Addon Purchase

    Reviews

    Index

    curl "https://api.gmodstore.com/v2/addons/565/reviews" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getReviews();
    

    This endpoint requires the addons.reviews.read permission

    Fetch all the reviews of an addon.

    GET https://api.gmodstore.com/v2/addons/<id>/reviews

    Route parameters:

    Name Type Description
    id Integer The id of the addon to fetch the reviews of

    Response code: 200
    Response resource: Collection<Addon Review>

    Show

    curl "https://api.gmodstore.com/v2/addons/565/reviews/223" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getReview(223);
    

    This endpoint requires the addons.reviews.read permission

    Fetch a review of an addon.

    GET https://api.gmodstore.com/v2/addons/<addon_id>/reviews/<review_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the review is of
    review_id Integer The id of the review to fetch

    Response code: 200
    Response resource: Addon Coupon

    Versions

    Index

    curl "https://api.gmodstore.com/v2/addons/565/versions" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getVersions();
    

    This endpoint requires the addons.versions.read permission

    Fetch all the versions of an addon.

    GET https://api.gmodstore.com/v2/addons/<id>/versions

    Route parameters:

    Name Type Description
    id Integer The id of the addon to fetch the versions of

    Response code: 200
    Response resource: Collection<Addon Coupon>

    Store

    curl -X POST "https://api.gmodstore.com/v2/addons/565/versions" \
      -H "Authorization: Bearer secret" \
      -F "name=Prometheus 2" \
      -F "changelog=Made it a **lot** better ;)" \
      -F "file=@prometheus2.zip"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->createVersion([
      'name' => 'Prometheus 2',
      'changelog' => 'Made it a **lot** better ;)',
      'file' => fopen('prometheus_2.zip', 'r')
    ]);
    

    This endpoint requires the addons.versions.write permission

    Create a new version for an addon.

    POST https://api.gmodstore.com/v2/addons/<id>/versions

    Route parameters:

    Name Type Description
    id Integer The id of the addon to create the coupon for

    Form fields:

    Name Type Description
    name String (1 - 80 chars) The name for the version
    changelog String (1 - 10,000 chars) The changelog for the version
    file File (zip) The file containing the addon

    Response code: 201
    Response resource: Addon Version

    Show

    curl "https://api.gmodstore.com/v2/addons/565/versions/6" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getVersion(6);
    

    This endpoint requires the addons.versions.read permission

    Fetch a specific version of an addon.

    GET https://api.gmodstore.com/v2/addons/<addon_id>/versions/<version_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the version belongs to
    version_id Integer The id of the version to fetch

    Response code: 200
    Response resource: Addon Version

    Download

    curl "https://api.gmodstore.com/v2/addons/565/versions/6/download" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getVersion(6)->getDownloadToken();
    

    This endpoint requires the addons.versions.download permission

    Generate a download token for a specific version of an addon.

    GET https://api.gmodstore.com/v2/addons/<addon_id>/versions/<version_id>/download

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the version belongs to
    version_id Integer The id of the version to download

    Response code: 200
    Response resource: Addon Download

    Update

    curl -X POST "https://api.gmodstore.com/v2/addons/565/versions/6" \
      -H "Authorization: Bearer secret" \
      -d "name=Prometheus 1.8&changelog=April fools xD"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getAddon(565)->getVersion(6)->update([
      'name' => 'Prometheus 1.8',
      'changelog' => 'April fools xD',
    ]);
    

    This endpoint requires the addons.versions.write permission

    Update a version of an addon.

    POST https://api.gmodstore.com/v2/addons/<addon_idid>/versions/<version_id>

    Route parameters:

    Name Type Description
    addon_id Integer The id of the addon the version belongs to
    version_id Integer The id of the version to fetch

    Form fields:

    Name Type Description
    name String (1 - 80 chars) The new name for the version
    changelog String (1 - 10,000 chars) The new changelog for the version

    Response code: 200
    Response resource: Addon Version

    Teams

    Main

    Show

    curl "https://api.gmodstore.com/v2/teams/177" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getTeam(177);
    

    This endpoint requires the teams.read permission

    Fetch a single team.

    GET https://api.gmodstore.com/v2/teams/<id>

    Route parameters:

    Name Type Description
    id integer The id of the team to fetch

    Response code: 200
    Response resource: Team

    Users

    Index

    curl "https://api.gmodstore.com/v2/teams/177/users" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getTeam(177)->getUsers();
    

    This endpoint requires the teams.read AND users.read permissions

    Fetch all the users in the given team.

    GET https://api.gmodstore.com/v2/teams/<id>/users

    Route parameters:

    Name Type Description
    id integer The id of the team to fetch

    Response code: 200
    Response resource: Collection<Team User>

    Users

    Main

    Show

    curl "https://api.gmodstore.com/v2/users/76561197988497435" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getUser(76561197988497435);
    

    This endpoint requires the users.read permission

    Fetch a single user.

    GET https://api.gmodstore.com/v2/users/<id>

    Route parameters:

    Parameter Type Description
    id integer The SteamID64 of the user to fetch

    Response code: 200
    Response resource: User

    Purchases

    Index

    curl "https://api.gmodstore.com/v2/users/76561197988497435/purchases" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getUser(76561197988497435)->getPurchases();
    

    This endpoint requires the users.read AND addons.purchases.read permissions

    Fetch all purchases a user has made.

    GET https://api.gmodstore.com/v2/users/<id>/purchases

    Route parameters:

    Parameter Type Description
    id Integer The SteamID of the user to fetch the purchases of

    Response code: 200
    Response resource: Collection<Addon Purchase>

    Teams

    Index

    curl "https://api.gmodstore.com/v2/users/76561197988497435/teams" \
      -H "Authorization: Bearer secret"
    
    use GmodStore\API\Client;
    
    $client = new Client('secret');
    
    $client->getUser(76561197988497435)->getTeams();
    

    This endpoint requires the users.read AND teams.read permissions

    Fetch all the teams of a user.

    GET https://api.gmodstore.com/v2/users/<id>/teams

    Route parameters:

    Name Type Description
    id Integer The SteamID of the user to fetch the team of

    Response code: 200
    Response resource: Team