Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    JWT Authentication API responded {"error":"Unauthenticated"}

    General Discussion
    2
    3
    1030
    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.
    • R
      rudiculous last edited by

      I called

      POST http(s)://example.com/api/customer/login?token=true
      

      alt text

      THen I tried to call API, I got {"error":"Unauthenticated"}

      GET <host>/api/customer/get
      

      alt text

      What did I miss?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Just add ?token=true in each request.

        1 Reply Last reply Reply Quote 0
        • R
          rudiculous last edited by

          @devansh-webkul said in JWT Authentication API responded {"error":"Unauthenticated"}:

          ?token=true

          YES! Thank you! It works now.
          But before it can work, I need to do this first:

          php artisan key:generate
          php artisan jwt:secret
          php artisan cache:clear
          php artisan config:clear
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post