6: Email Confirmations
Activity 9: Testing the Complete User Registration and Activation Workflow
Solution
- We will first register a new user through Postman. Click on the Collections tab and choose the POST UserList request.
- Select the Body tab and then select the raw radio button and choose JSON (application/json) from the drop-down list.
- Put in the following user details (in JSON format) in the Body field. Change the username and password to the appropriate one:
{ Â Â Â Â "username": "john", Â Â Â Â "email": "smilecook.api@gmail.com", Â Â Â Â "password": "Kwq2z5" }
- Send the request. You should see the following output:
Figure 6.10: Registering a user through Postman
You should see the new user details (ID = 4) in the response, with HTTP status 201 OK. That means the new user was created successfully in the backend.
- Log in through the API and click on...