# Setting up API access

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

{% 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.&#x20;
{% 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.&#x20;

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

<figure><img src="https://4021917470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpZtVLrUwNfGfPLu2CDM%2Fuploads%2Fb4F6EhWExcB0G823zrVC%2FScreenshot%202026-01-27%20at%2011.34.41.png?alt=media&#x26;token=a22ff633-23ec-41fc-a107-c1c97c89c593" alt=""><figcaption><p>Integrations page on stub</p></figcaption></figure>

## 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://4021917470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpZtVLrUwNfGfPLu2CDM%2Fuploads%2FeByKftwIoFnhQDFwm1Jq%2Fstubapi.json?alt=media&token=403ccabe-676a-4f26-92d5-c6516301d7e2>" path="/api/verify/apikey" method="post" expanded="true" %}
[stubapi.json](https://4021917470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnpZtVLrUwNfGfPLu2CDM%2Fuploads%2FeByKftwIoFnhQDFwm1Jq%2Fstubapi.json?alt=media\&token=403ccabe-676a-4f26-92d5-c6516301d7e2)
{% endopenapi %}

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