Magna API Documentation
  • Introduction
  • Authentication
  • Allocations
    • Allocation List
    • Allocation by ID
    • Claim Allocation Tokens
    • Schedule
  • Transactions
    • Transaction Signing Parameters
    • Indexing Transaction
  • Tokens
    • Tokens List
    • Token Summary
  • Nodes
  • Use Cases
  • Security Considerations
  • Webhooks
    • Getting Started
    • Register Webhooks
    • Security
    • Payload Schemas
    • FAQs
  • Claim Portal API
    • Allocations
    • Parameters
  • Protocol Hooks
Powered by GitBook
On this page

Was this helpful?

  1. Allocations

Claim Allocation Tokens

Claim tokens associated with a specific allocation by signing the claim request. By signing the claim request parameters, users trigger their intention to claim the allocated tokens to be claimed and withdraw to the allocation wallet.

Note: If there are no available tokens to claim, the user will still be able to obtain and sign the transaction, but will claim 0 tokens.

Example request

curl -X POST <https://app.magna.so/api/external/v1/allocations/{your_allocation_id}/claim> \\
-H 'Content-Type: application/json' \\
-H 'x-magna-api-token: magna_project_api_token' \\
-d '{
"sender": "signer_wallet_address",
"userCountryCode": "US",
}'
  • magna_project_api_token (required) - replace with your actual Magna API token

  • your_allocation_id (required) - replace with your allocation id which you want to claim tokens

  • sender (required) - replace with the wallet address that is going to sign the claim transaction

  • userCountryCode (optional) - you can use it to verify based on the users’ geo location and block them based on the blocked country list

Solana Response:

{
  "isProcessed": true,
  "result": {
    "__type": "SolanaTransactionGroupParameters",
    "parameters": [
      {
        "instructions": [],
        "transactionId": "7ea0cd8f-26aa-4cfe-acad-e57f6ec62bfe"
      }
    ]
  }
}

EVM Response (TBD):

{
  "isProcessed": true,
  "result": {
    "parameters": [
      {
        "instructions": [],
        "transactionId": "7ea0cd8f-26aa-4cfe-acad-e57f6ec62bfe"
      }
    ]
  }
}

PreviousAllocation by IDNextSchedule

Last updated 11 months ago

Was this helpful?