Skip to content

Commit

Permalink
Merge pull request #133 from dimagi/ce/user-create-api-updates
Browse files Browse the repository at this point in the history
add trailing slash and correct data
  • Loading branch information
calellowitz authored Sep 27, 2023
2 parents 8016185 + b4b58b6 commit da8d5b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commcare_connect/users/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def get_organization_for_request(request, view_kwargs):


def create_hq_user(user, domain, api_key):
mobile_worker_api_url = f"{settings.COMMCARE_HQ_URL}/a/{domain}/api/v0.5/user"
mobile_worker_api_url = f"{settings.COMMCARE_HQ_URL}/a/{domain}/api/v0.5/user/"
hq_request = requests.post(
mobile_worker_api_url,
data={
json={
"username": user.username,
"connect_user": user.username,
"connect_username": user.username,
},
headers={"Authorization": f"ApiKey {api_key.user.email}:{api_key.api_key}"},
)
Expand Down

0 comments on commit da8d5b0

Please sign in to comment.