FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Login API

    Scheduled Pinned Locked Moved
    Q&A
    0
    2
    3.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      talha.yildiz
      last edited by

      Reading the docs regarding /api/login
      I understand that it must be possible to login a user with loginId and password and no additional fields or API key:

      {
          "loginId": "testuser@example.com",
          "password": "password"   
      }
      

      However I get the "TenantIdRequired" error with the following message:

      {
          "generalErrors": [
              {
                  "code": "[TenantIdRequired]",
                  "message": "A Tenant Id is required to complete this request. To complete this request, you may assign a Tenant to your API key, or add the X-FusionAuth-TenantId HTTP request header with the Tenant Id."
              }
          ]
      }
      

      FusionAuth Version is 1.27.2.
      Made a quickstart with homebrew.
      Am I missing something? Thank you!

      1 Reply Last reply Reply Quote 0
      • M
        marcasellkhelaifi
        last edited by

        I think you missed to put FusionAuth Tenant ID.

        In my case, I create a file called appConfig.json :

        e89f0007-0a18-41d8-b184-5e820eafa09e-image.png

        The file contains :

        • FusionAuth URL (where you deploy your FusionAuth app such as https://login.mywebsite.com)
        • FusionAuth Tenant ID
        • FusionAuth App ID
        • FusionAuth Client Key

        Afterwards, I create a new instance of FusionAuth like this (in another file):

        d60fe095-14be-4a7e-85fb-44b49a68c462-image.png

        I pass FusionAuth Tenant ID here as a parameter.

        Hence, I can fire a login function like below :
        a4eed8ff-1441-4f15-9a93-9123603c36c7-image.png

        1 Reply Last reply Reply Quote 0
        • First post
          Last post