> For the complete documentation index, see [llms.txt](https://sevenheaven.gitbook.io/sevenheaven/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenheaven.gitbook.io/sevenheaven/rewards-and-campaings/x-twitter-connect.md).

# X-(Twitter) Connect

7H is launching an innovative Twitter follower campaign to boost brand awareness. We will incentivize community members to follow our Twitter account by rewarding them with SPL NFTs. Here are the details of this campaign:

#### User Journey

1. The user signs up or logs in to the 7H application.
2. The user links their Twitter account to the 7H app.
3. They receive an SPLtoken in their wallet.

This journey involves only four to five clicks, and all interactions take place within the 7H app.

#### Campaign Workflow

1. **Creation of** SPL **Contract:**
   * An SPL contract, including a metadata file specifying the properties of the uploaded media to IPFS, is created.
   * SPL contract creation is done through the 7H API.
2. **User and Wallet Creation:**
   * Users are registered using the  7H API, and a unique wallet is created for each user.
   * External wallets are supported.
3. **Linking Twitter Accounts:**
   * Users are given permission to link their Twitter accounts to the 7H app.
   * Twitter API is used to verify account followers.
4. **Minting** SPL **Tokens for Users:**
   * SPL tokens are minted for verified users with linked Twitter accounts.
   * SPL minting is done through the  7H API.

#### Sample Requests

**Creation of** SPL **Contract:**

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/SPL \
     --header 'Authorization: Bearer <YOUR_KEY_HERE>' \
     --data '
{
  "symbol": "CQR",
  "name": "sevenheaven-art",
  "base_uri": "https://nftstorage.link/ipfs/bafybeiasv4llnkervuprzfte5sulodkzobcmpfc7ldwybdwiqq5ywbbstu/"
}
```

**User and Wallet Creation:**

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/user \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "email": "user@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "phone_number": "1234567890"
}
```

**Linking and Verifying Twitter Accounts:**

```bash
bashCopy codecurl --location 'https://api.twitter.com/2/users/user_id/following?max_results=5&access_token=ACCESS_TOKEN'
```

**Minting** SPL**Tokens for Users:**

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/SPL/mint \
     --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "mint_quantity": 1,
  "wallet_address": "0x0c040570aa12e202a5fa382b5b389dfc794a9f7b",
  "SPL_id": "1824b6fe-ca95-44ac-987f-35cd4c9e436d"
}
```

In this example, we detailed 7H\`s Twitter follower campaign. Users are rewarded with SPL tokens when their Twitter follower status is confirmed, enhancing brand engagement and strengthening community loyalty.
