> For the complete documentation index, see [llms.txt](https://docs.well.eco/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.well.eco/weco/sdk.md).

# SDK

The **SDK (Software Development Kit)** is a set of tools and libraries that developers can use to integrate WELL3's features into their own applications. Here's a step-by-step guide to get you started:

**Step 1: Set Up Your Development Environment**

1. *Install Node.js*: Ensure you have Node.js installed on your system. You can download it from the official Node.js website.
2. *Create a New Project*: Create a new directory for your project and initialize it with npm init to create a package.json file.

#### Step 2: Install the WELL3 SDK

1. *Install the SDK*: Use npm to install the WELL3 SDK by running the following command: bash npm install well3-sdk

#### Step 3: Initialize the SDK

1. *Import the SDK*: In your project's main file (e.g., index.js), import the WELL3 SDK: javascript const WELL3 = require('well3-sdk');

#### Step 4: Connect to the WELL3 Platform

1. *Initialize the SDK*: Create an instance of the SDK and connect to the WELL3 platform: javascript const well3 = new WELL3({ apiKey: 'YOUR\_API\_KEY', apiSecret: 'YOUR\_API\_SECRET' });

#### Step 5: Use SDK Features

1. *Fetch User Data*: Use the SDK to fetch user data from the WELL3 platform: javascript well3.getUserData(userId, (err, data) => { if (err) { console.error('Error fetching user data:', err); } else { console.log('User data:', data); } });
2. *Submit Health Data*: Submit health data to the WELL3 platform: javascript well3.submitHealthData(userId, healthData, (err, response) => { if (err) { console.error('Error submitting health data:', err); } else { console.log('Health data submitted successfully:', response); } });
3. *Earn Rewards*: Use the SDK to check and redeem rewards: javascript well3.checkRewards(userId, (err, rewards) => { if (err) { console.error('Error checking rewards:', err); } else { console.log('Rewards:', rewards); } });

#### Step 6: Handle Errors

1. *Error Handling*: Implement error handling to manage any issues that arise during SDK usage: javascript try { // SDK operations } catch (error) { console.error('An error occurred:', error); }

This is a basic guide to get projects started with the WELL3 SDK. Please refer to the official WELL3 documentation for more detailed information and advanced features.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.well.eco/weco/sdk.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.
