> For the complete documentation index, see [llms.txt](https://developers.stub.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.stub.africa/setting-up-api-access.md).

# Setting up API access

Interacting with the stub Connect API

The stub Connect API has two environments: production and test. Both environments use the same login details (email and password).

{% hint style="info" %}
**You can access the test environment with the following details:**\
Test website address: <https://test.stub.africa/>\
Test API endpoin&#x74;**:** <https://test.connect.stub.africa/>\
Test key forma&#x74;**:** <mark style="color:green;">sk\_test\_xxxxxxxxxxxxxxxxxxx</mark>
{% endhint %}

{% hint style="info" %}
**You can access the production environment with the following details:**\
Production website address: <https://stub.africa/>\
Production API endpoint: <https://connect.stub.africa/>\
Production key format: <mark style="color:green;">sk\_live\_xxxxxxxxxxxxxxxxxxx</mark>
{% endhint %}

{% hint style="danger" %}
For production access and your **appid** please reach out to us.
{% endhint %}

{% hint style="info" %}
**Need finer-grained access or MCP?**\
For scoped, fine-grained API access, or to connect to stub over MCP, reach out to us from your stub account.
{% endhint %}

### **Where to get your API key:**

To get your test API key login into <https://test.stub.africa/> using the login details you created in the introduction.

1. Log in to your stub account
2. Select **Apps** in the left side nav bar
3. Select **API key** in the top right
4. You can now view and copy your API key

## Now test that your API Key works

Now that you have your API key make sure everything is working correctly by making a post request to the test API endpoint below. You can select any App ID that includes your business name.

{% openapi src="<https://openapi.gitbook.com/o/S24dgdsS19GA0VIrLmgN/spec/stubapi-corrected.json>" path="/api/verify/apikey" method="post" expanded="true" %}
<https://openapi.gitbook.com/o/S24dgdsS19GA0VIrLmgN/spec/stubapi-corrected.json>
{% endopenapi %}

{% hint style="success" %}
**Winner winner:** If you get a `200 OK` you're ready to start using our API.
{% endhint %}
