Navexa API
    Navexa API
    • Start your Navexa journey
    • Authentication
    • Reports
      • Get ATO myTax report
        GET
      • Get ATO myTax report PDF
        GET
      • Get Capital Gains Tax report
        GET
      • Get Taxable Income report
        GET
      • Get Unrealised Capital Gains Tax report
        GET
    • Benchmark
      • Get the benchmark return for a portfolio
        GET
    • CashAccount
      • Get Cash Account
        GET
      • Delete a Cash Account
        DELETE
      • Get all Cash Accounts
        GET
      • Create a Cash Account
        POST
      • Update a Cash Account
        PUT
      • Get Cash Account Transactions
        GET
    • CashAccountTransactions
      • Get a Cash Account Transaction
        GET
      • Delete a Cash Account Transaction
        DELETE
      • Create a Cash Account Transaction
        POST
      • Update a Cash Account Transaction
        PUT
    • Clients
      • Get all Clients
        GET
      • Create a client
        POST
      • Gets Client
        GET
      • Update a client
        PUT
      • Delete client
        DELETE
      • Get client Portfolios
        GET
      • Assign portfolios to client
        PUT
    • Holdings
      • Get a holding
      • Update a holding
      • Delete a holding
      • Get a holding's trades
      • Get holding income records
      • Update a holding's symbol and exchange
    • PortfolioPerformance
      • Get portfolio performance
    • Portfolios
      • Get all portfolios
      • Create a portfolio
      • Get a portfolio
      • Update a portfolio
      • Delete a portfolio
      • Get all portfolio holdings
    • ProRataDistributions
      • Update ETF Distributions ProRata
    • StocksIncome
      • Get an income record
      • Update Income record
      • Confirm Income record
    • TaxSettings
      • Get all portfolio tax settings
      • Get portfolio tax setting
      • Update portfolio tax settings
    • Trades
      • Get a trade
      • Delete a trade
      • Add a trade
    • CustomInvestmentPrice
      • Get a Price
      • Delete a Price
      • Add a Price
      • Update a Price

    Authentication

    Authenticating with the Navexa API#

    The Navexa API supports two authentication methods:
    1.
    OAuth 2.0 Authorization Code Flow - Suitable for applications that require user authentication and authorization.
    2.
    API Key Authentication - Designed for accessing your own data with a simpler authentication mechanism.

    1. OAuth 2.0 Authorization Code Flow#

    Use OAuth 2.0 Authorization Code Flow when you need user authentication and permission-based access to resources.
    You can request a ClientId and Secret by emailing info@navexa.io with the subject 'Api Access Request'. Also please provide an explanation of your use case.

    Requesting an Authorization Code#

    Redirect the user to the authorization endpoint to obtain an authorization code:
    https://auth.navexa.io/authorize?
    response_type=code&
    client_id=YOUR_CLIENT_ID&
    redirect_uri=YOUR_REDIRECT_URI&
    scope=YOUR_REQUESTED_SCOPES&
    state=RANDOM_STRING

    Exchanging the Authorization Code for an Access Token#

    After the user successfully grants permission to your application, the authorization server will redirect them to your specified redirect URI with an authorization code.
    This code must be exchanged for an access token by sending a POST request to the token endpoint:
    curl --request POST \
      --url https://auth.navexa.io/oauth/token \
      --header 'content-type: application/json' \
      --data '{
        "client_id": "YOUR_CLIENT_ID",
        "client_secret": "YOUR_CLIENT_SECRET",
        "code": "{AUTHORIZATION_CODE}",
        "grant_type": "authorization_code",
        "redirect_uri": "YOUR_REDIRECT_URI"
      }'
    Important Notes
    Secure the Authorization Code: Do not expose or share the authorization code.
    Tokens Expire: Refresh tokens may be issued to obtain new access tokens without user interaction.

    Using the Access Token#

    Once you obtain the access token, include it in the Authorization header of your API requests:
    curl --request GET \
      --url https://api.navexa.io/some-endpoint \
      --header "Authorization: Bearer YOUR_ACCESS_TOKEN"

    Use Cases for OAuth 2.0 Authorization Code Flow#

    When users need to authenticate and grant permission to access their data.
    When integrating Navexa into third-party web or mobile applications.
    When implementing secure, user-based authentication workflows.

    2. API Key Authentication#

    If you are only accessing your own data, you can use API Key authentication instead of OAuth 2.0.
    You can request an API Key by emailing info@navexa.io with the subject: 'API Key Request'.

    Using an API Key#

    Simply include your API Key in the x-api-key header of your request:
    curl --request GET \
      --url https://api.navexa.io/some-endpoint \
      --header "x-api-key: YOUR_API_KEY"

    Important Notes#

    API Keys provide access only to your own data.
    Do not expose your API Key publicly to avoid unauthorized access.

    Use Cases for API Key Authentication#

    When you only need to access your own account’s data.
    When integrating Navexa with personal automation scripts.
    When you want a simpler authentication method without token expiration handling.
    By choosing the appropriate authentication method based on your use case, you can ensure secure and efficient access to the Navexa API.
    Modified at 2025-02-04 03:54:37
    Previous
    Start your Navexa journey
    Next
    Get ATO myTax report
    Built with