LogoLogo
WebsiteLoginStatus
API Reference
API Reference
  • Introduction
  • Introduction to GraphQL
    • What is GraphQL?
      • GraphQL Schema
      • Example Using GraphQL
    • Authentication
    • Queries
      • Example Query
    • Mutations
      • Example Mutation
    • Variables
    • Fields
  • Develop With inabit API
    • Getting Started
      • Authentication
      • inabit Postman Collection
    • Organizations
      • Organization Info
      • Organization ID
      • Organization Users
      • Organization Contacts
      • Organization Transactions
    • Wallets
      • Wallets Info
      • Create inabit Wallet
      • Edit Wallet Name
      • Generate Deposit Address
      • Fetch Deposit Address
      • Save Address to Whitelist
      • Archive / Unarchive Wallet
      • Disconnect Exchange Wallet
    • Contacts
      • Contact Info
      • Create New Contact
      • Update Contact
    • Transactions
      • Transaction Info
      • Create Transfer Request
      • Create Off Ramp Request
      • Create On Ramp Request
      • Create Exchange Swap
      • Create inabit Wallet Swap
      • Edit Transaction Note
    • Utilities
      • Fetch Financial Asset
      • Fetch Blockchains
  • Remote Approver App
    • Setup and Configuration
    • API Wallets Generation
    • Automate Signing Transactions
    • Webhooks
      • Notification Types
  • WHAT WE SUPPORT
    • Assets & Tokens
    • Blockchains
    • Exchanges
      • Binance
      • Kucoin
      • Kraken
  • Changelog
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Introduction to GraphQL

Authentication

Authenticating to the GraphQL API

PreviousExample Using GraphQLNextQueries

Was this helpful?

The Root Endpoint

REST APIs has numerous endpoints; the GraphQL API has a single endpoint:

https://api.inabit.com/graphql

The endpoint remains constant no matter what operation you perform.

Because GraphQL operations consist of multiline JSON, we recommend using the to make GraphQL calls.

You can also use curl or any other HTTP-speaking library.

In REST, HTTP verbs determine the operation performed. In GraphQL, you'll provide a JSON-encoded body whether you're performing a query or a mutation, so the HTTP verb is POST. The exception is an introspection query, which is a simple GET to the endpoint.

To query GraphQL in a curl command, make a POST request with a JSON payload. The payload must contain a string called query:

curl -H "Authorization: bearer TOKEN" -X POST -d " \
 { \
   \"query\": \"query { viewer { login }}\" \
 } \
" https://api.github.com/graphql

Note: The string value of "query" must escape newline characters or the schema will not parse it correctly. For the POST body, use outer double quotes and escaped inner double quotes.

Apollo Explorer