XHRGEThttp://localhost:8103/fhir/R4/ValueSet/$expa...
# support
d
getting this error on medplum localhost , do i need to add any keys somewhere ? this happens while creating a new questionaire @rahul1
r
Hi @dheeraj.dileep , it seems like the error message was truncated. Please update your post with more details about the error, and I will be happy to assist
d
this is the error , is the becasue do i need to give some api keys somewhere , i'm trying to set it up locally @rahul1
Copy code
{
  "resourceType": "OperationOutcome",
  "id": "unauthorized",
  "issue": [
    {
      "severity": "error",
      "code": "login",
      "details": {
        "text": "Unauthorized"
      }
    }
  ],
  "extension": [
    {
      "url": "https://medplum.com/fhir/StructureDefinition/tracing",
      "extension": [
        {
          "url": "requestId",
          "valueUuid": "dab5714b-0941-40b8-b974-5e8119005fa5"
        },
        {
          "url": "traceId",
          "valueUuid": "69bc65cb-3ed5-4317-8a1c-e814e1b69c20"
        }
      ]
    }
  ]
}
this is the response from the backend
r
This indicates that you are not logged in, which is why you are receiving an unauthorized error
Please study the Medplum Hello World example app. This will show you the basics of authentication inside a React Application, and how to make API calls: https://github.com/medplum/medplum/tree/main/examples/medplum-hello-world
d
so i need to login first in the app.medplum.com and then login in my localhost with the same credentials right?
i've also tried with the creds in the docs itself ,the admin@example.com , but still the same error
r
nope, no need to log into app.medplum.com - just your localhost
d
done it , it was not working , but when i host my backend code , it worked , my main aim was to try out bots to know will it fit in our project @reshma , but the hosted backend says i need to enable bots
r
hi @dheeraj.dileep - bots are part of our offerings https://www.medplum.com/pricing - if you are prototyping, perhaps localhost is sensible, but if you need to move to production that's when hosted is suitable
d
im in my prototyping phase ,and running it in my localhost , but I'm getting the above-mentioned error, i guess its because of the http? and not https because the hosted link is working
r
oh I see, log into super admin and naviate to http://localhost:3000/Project and click on the project you want to edit
enable the bot feature in super admin and save, then your project should be enabled for bots
d
got it
also please tell me why i am getting this error "Could not load credentials from any providers" @reshma
s
Hi, are there any docs for making API calls to Medplum? e.g. from a Django service through a REST endpoint
d
r
Thank you @dheeraj.dileep !
151 Views