# Roblox Developer Packages

## BloxTech API Client

This package contains the core fundamentals to interact with the Ranking API, featuring auto-retries, a request queue, Promises and type-safety :sparkles:

To install this package, follow these steps:

{% stepper %}
{% step %}

### Generate a BloxTech API Key

Follow the steps in [Ranking API](/docs/ranking-api.md) to generate an API key, then continue with this guide.
{% endstep %}

{% step %}

### Get the module

Go to [this link](https://create.roblox.com/store/asset/129001733876030/BloxTech-Ranking-API) on the Creator Hub, and press the blue **Get Model** button.&#x20;

<figure><img src="/files/XVVdTmPp5D5pCRdoKfSo" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enter Roblox Studio

Find your game in **Roblox Studio**, open the place and make sure the **Explorer, Toolbox** and **Properties** windows are visible. You can find these under the **View** tab.

<figure><img src="/files/8A8De0sFrqxHJDZjevYj" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Insert the BloxTech API

In the **Toolbox** window, navigate to the second tab and click on **BloxTech Ranking API**.

<figure><img src="/files/IQecB6WbZ4T6ZAvb6QZP" alt="" width="440"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Drag the Script to ServerStorage

Click and drag the **BloxTechAPI** script to **ServerStorage**.

<figure><img src="/files/Zy8SjI2E4PZNYVOAEJZV" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Insert your API key

Click on the **BloxTechAPI** script, and in the **Properties** window, paste the API key you generated earlier in the ApiKey field.

<figure><img src="/files/BKEnUpkVDCMvTSVtXSMo" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### :tada: You did it!

Now that BloxTech's API is installed, you can use it in your other Scripts.

To do this, add the following two lines at the top of your Script:

{% code overflow="wrap" %}

```lua
local BloxTech = require(game.ServerStorage.BloxTechAPI)
local BloxTechClient = BloxTech.new()
```

{% endcode %}

Now you can interact with `BloxTechClient` directly to manage your group members:

### **Update member rank**

<pre class="language-lua" data-overflow="wrap" data-full-width="false"><code class="lang-lua"><strong>BloxTechClient:setRank(8460964972, 1)
</strong>    :andThen(function(response)
        -- Runs when the rank has been updated successfully
        print("Success", response)
    end)
    :catch(function(response)
        -- Runs when the rank couldn't be updated
        -- eg. because they already have this rank
        warn("Error", response)
    end)
</code></pre>

### Accept Join Request

<pre class="language-lua"><code class="lang-lua"><strong>BloxTechClient:acceptJoinRequest(8460964972)
</strong>    :andThen(function(response)
        -- Runs when the join request has been accepted successfully
        print("Success", response)
    end)
    :catch(function(response)
        -- Runs when the request couldn't be accepted
        -- eg. because they haven't sent any request yet
        warn("Error", response)
    end)
</code></pre>

### Reject Join Request

<pre class="language-lua"><code class="lang-lua"><strong>BloxTechClient:rejectJoinRequest(8460964972)
</strong>    :andThen(function(response)
        -- Runs when the join request has been rejected successfully
        print("Success", response)
    end)
    :catch(function(response)
        -- Runs when the request couldn't be rejected
        -- eg. because they haven't sent any request yet
        warn("Error", response)
    end)
</code></pre>

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bloxtech.tech/docs/ranking-api/roblox-developer-packages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
