Hosted Portal
Create a user and a portal session on your server. Then open the URL from the session response.
1. Create the user and add wallets
Call POST /api/crunch on your server. Set provider to the chain for each wallet, such as ethereum or solana. Do not use the wallet app name. This call creates the user if needed and starts wallet imports.
curl --fail-with-body 'https://api.awaken.tax/api/crunch' \-H "x-client-id: $AWAKEN_CLIENT_ID" \-H "x-api-secret: $AWAKEN_API_SECRET" \-H 'Content-Type: application/json' \--data-raw '{"userId":"YOUR_USER_REFERENCE","wallets":[{"address":"YOUR_ETHEREUM_ADDRESS","provider":"ethereum"},{"address":"YOUR_SOLANA_ADDRESS","provider":"solana"}]}'
Create user request fields
| Field | Required | Value |
|---|---|---|
userId | Yes | A non-empty ID for this user in your system. |
email | No | A valid email address for a new user. |
wallets | No | Up to 4 wallets. Omit this field or send an empty array to create the user without wallets. |
wallets[].address | For each wallet | A non-empty wallet address. |
wallets[].provider | No | The chain value, such as ethereum, solana, base, or polygon. Set it for each wallet. Without it, the API detects chains only for 0x and ENS addresses. It skips other addresses. |
wallets[].name | No | A wallet label. Awaken uses the partner name if you omit it. |
2. Create a portal session
Call POST /api/access-tokens on your server after step 1. Set referenceId to the same value as userId. The response has data.portalUrl and a token that expires.
curl --fail-with-body 'https://api.awaken.tax/api/access-tokens' \-H "x-client-id: $AWAKEN_CLIENT_ID" \-H "x-api-secret: $AWAKEN_API_SECRET" \-H 'Content-Type: application/json' \--data-raw '{"referenceId":"YOUR_USER_REFERENCE"}'
Portal session request fields
| Field | Required | Value |
|---|---|---|
referenceId | Yes | The non-empty userId from step 1. The user must belong to your partner. |
email | No | A valid email address to add to the portal URL. |
expiresInSeconds | No | How long the token lasts, in whole seconds. Must be greater than 0. The default is 3,600 seconds. The server caps larger values. |
3. Open the portal URL
Send the user to data.portalUrl from step 2. This URL has the access token. A URL with only the user ID cannot open the portal.
The portal URL has an access token. Send it only to this user. Keep your client ID and API secret on your server.
Link wallets with the npm package
The @awakentax/crypto-tax package is for a separate signup flow. It makes a link that lets new users sign up and existing users add wallets.
npm install @awakentax/crypto-tax
Create an Awaken wallet link
On your server, set the API key, call createLink, and send the returned URL to the user.
import { CryptoTaxSDK } from "@awakentax/crypto-tax";import type { CreateLinkRequest } from "@awakentax/crypto-tax";const cryptoTax = new CryptoTaxSDK({apiKey: process.env.AWAKEN_API_KEY!,});const request: CreateLinkRequest = {wallets: [{ address: "0x1234…", name: "Primary wallet" },{ address: "0xabcd…" },],};const { url, code } = await cryptoTax.createLink(request);console.log({ url, code });
What users see
The portal can show your company name and logo. Users can watch wallet import progress, check tax results, choose a tax year, and download reports.
The embedded portal currently supports US tax reports. Check the user's country before they start.