Create Client endpoint always creates client on su...
# support
y
I'm trying to use Postman to create a new project, and then create a client for that project. My Postman flow looks like: 1. Get superadmin access token 2. Use token to create a new project, and grab the project ID 3. Invite some users 4. POST to /admin/projects/{{project_id}}/client to generate a new client However, the endpoint seems to ignore the project ID param entirely. No matter what I pass in there, the client is created on the super admin project. I suspect I'm doing something wrong. The auth token I'm using is for the superadmin project. I figured I should be able to use that token to create a client for a different project so long as I specify the correct project ID in the URL. Do I need an access token that's scoped to the project in order to create a client for that project? But in order to have a project scoped access token, don't I already need a client for that project? A bit of a chicken/egg problem.
r
Hi @yale_77214 , I'm sorry about this. I just looked at our code and believe this is a bug. I'll file a ticket and get back to you.
y
Thank you 🙂
@yale_77214 - Just wanted to let you know that we have a PR out to fix this: https://github.com/medplum/medplum/pull/2722 Shout out to @Derrick submitting this!
y
Woohoo! Thanks @Derrick!
d
You're very welcome 🙂
171 Views