Add attributes

You can check your schema in the Identity Cloud Console to see if you have the root-level mobileNumber and mobileNumberVerified attributes:

  1. Click on your application in the left column navigation
  2. Click to open MANAGE SCHEMAS, and click on the pertinent Entity Type (e.g. user) to open it
  3. Scroll down and check the Name column for mobileNumber and mobileNumberVerified. You need both!

Required SMS attributes in Console

If both attributes are present, as in the screenshot above, then you do not need to take any further action on your schema. Skip to Update Your Flow.

If these attributes are missing, you must add them for SMS functionality:

The following steps through adding these attributes via the Identity Cloud Console. If you’d prefer, you can do the same via API calls using the /entityType.addAttribute endpoint.

  1. From the Manage Schema page in Console, click the CREATE button in the top-right corner. CREATE button in Console
  2. Select Create Attribute Create Attribute in Console
  3. Select IMPORT JSON IMPORT JSON in Console
  4. Click the “paste in your own JSON” link Paste your own JSON in Console
  5. Paste the following into the box:
{
	"length": 256,
	"case-sensitive": false,
	"constraints": [
		"unique"
	],
	"name": "mobileNumber",
	"features": [
		"query"
	],
	"type": "string"
}
  1. Click the SAVE button (Note that you may need to click twice - once to allow the JSON to be validated, then again to save the new attribute.) Save JSON in Console
  2. On the success modal, click VIEW. This will return you to the Manage Schema page and refresh it for you so you can see the added attribute. Successful attribute creation in Console
  3. Repeat these steps, pasting the following into the box in step 5:
{
	"name": "mobileNumberVerified",
	"type": "dateTime"
}

Your schema is now ready to support SMS in Hosted Login v2!