Add User Image
Number of APIs: 3
This activity shows you how to update the user image for an existing user.
The following operations are supported by the PingOne APIs:
- Create a user
- Create an image
- Update the user profile
Prerequisites
- Get an access token from the worker application that you created in Getting Started with the PingOne APIs. To get a token from a different worker application in an alternate sandbox environment, run the token request endpoint using the client ID and client secret of your chosen worker app to authenticate the request. For more information, see GET a Worker Application Access Token.
- Run Read all populations to find a population ID value. You will use this value to create a user in step 1.
- Download an image file (maximum size 2 MB) to your machine. You will attach this image to the request in step 2.
Workflow order of operations
To upload and assign a user image, complete the following tasks:
- Make a
POST
request to/environments/{{envID}}/users
to create a user. - Make a
POST
request to/environments/{{envID}}/images
to upload an image to your PingOne environment. - Make a
PATCH
request to/environments/{{envID}}/users/{{userID}}
to assign the image to a user profile.
Note: You can add an image to an existing user by making a GET
request to /environments/{{envID}}/users
to find the userID
.
-
Step 2: Create Image POST {{apiPath}}/environments/{{envID}}/images
-
Step 1: Create User POST {{apiPath}}/environments/{{envID}}/users
-
Step 3: Update User PATCH {{apiPath}}/environments/{{envID}}/users/{{userID}}