Hello World Connectors

chevron-rightPrerequisiteshashtag
  • Python 3.11 or higher

  • Poetry 1.8.1 or higher (recommended)

circle-info

All the code used in the following examples can be found in our GitHub repository bosa-example-apps/bosa-sdk-connectors-example-apparrow-up-right.

Running BOSA Connectors Example App

git clone https://github.com/GDP-ADMIN/bosa-example-apps.git
cd /bosa-connectors-example-app

✅ Ensure the BOSA API is running. You can test locally or use the Staging or Production environments.

⚠️ If you use BOSA Staging, ensure the GDP VPN is turned on

✅ Setting Up the Environment Variables

To configure the application, you need to set up a .env file in the root directory of the project. This file will store environment variables required for the application to run. Below is an example of the .env file:

BOSA_API_URL="api.bosa.id"
BOSA_API_KEY="sk-client-abcde..."
BOSA_USERNAME="bosa"
BOSA_USER_SECRET="sk-user-abcde..."
  • BOSA_API_URL = BOSA API url. You can use staging https://staging-api.bosa.id or production api.bosa.id

  • BOSA_API_KEY: Your BOSA API key for authentication. This key is required to make requests to the BOSA API.

  • BOSA_USERNAME: Your BOSA username. Required to create a new BOSA user or authenticate the user.

  • BOSA_USER_SECRET: The user secret for authenticating requests to the BOSA API.

❗If you are new (don't have a BOSA Connector User), follow the steps herearrow-up-right.

❗NOTE: Since bearer tokens can have a long lifespan, it is highly recommended to reuse existing tokens whenever possible.

▶️ Execute the script for installing and start the dependencies

⬆️ This script will do the following:

  • Installing dependencies

🚀 Then run the app

this is the expected output

({'data': {'data': {'id': '44196397', 'name': 'Elon Musk', 'username': 'elonmusk'}}, 'meta': None}, 200)

Last updated