LogoLogo
MidpointContact UsThe Docs are Wrong!
  • What is Midpoint
  • What actually is a midpoint?
  • Midpoint FAQs
  • Get Started
    • Sample Midpoints
      • Filecoin Filrep Oracle: Obtain miner reputations on-chain
      • Oracle: Call any API from a smart contract
      • Listener: Subscribe an internal service to any event
      • Data Feed: Stream a data feed on-chain at regular intervals
      • Data Bridge: Pass arbitrary messages between chains
      • Automation: Ensure a function is called at regular intervals
    • Videos
  • Using Midpoint
    • API Key
    • Midpoint CLI
    • GraphQL API
    • Dashboard
  • Core Concepts
    • Midpoints
      • Midpoint ID
      • Sources
      • Tasks
      • Source and Task Definitions
        • Secrets
        • Variables
        • Exclude Logs
        • Extracts
    • Requests
      • Request ID
      • Events
    • Credits and Payment
  • Sources
    • Startpoint Called
    • EVM Event Emitted
    • Cron Job Triggered
  • Tasks
    • Make HTTP Request
      • OAuth and Multi-Step Authentication
    • Call EVM Function
    • Transact to EVM Function
      • Security
    • Shift Decimal
  • More Reading
    • Chain IDs
    • Startpoints
    • Midpoint EOAs
  • Get in Touch
    • Contact Links
Powered by GitBook
On this page

Was this helpful?

  1. Core Concepts
  2. Midpoints
  3. Source and Task Definitions

Secrets

Use confidential data throughout your tasks.

Secrets are values that are defined off-chain which contain sensitive information such as API keys. Once defined, secrets are not viewable or editable. Secrets are never accessible after being encrypted and are only decrypted during runtime when a request is made.

  • All secrets are stored as strings and can contain only string literals.

  • Variables and references to other secrets are not permitted in secret values.

  • A midpoint that references secrets that have not yet been defined can not be published

In order to interpolate a secret during runtime, enter the name of a secret, surrounded by double brackets, e.g. [[secretName]]

Sample usage of a secret inside a Make HTTP Request definition:

{
    "authType": "bearer",
    "auth": {
        "bearer": "[[bearer_token]]"
    }
}

Working with Secrets

midpoint add-secret <value> <name>
midpoint delete-secret <name>
midpoint list-secrets
PreviousSource and Task DefinitionsNextVariables

Last updated 2 years ago

Was this helpful?