Set a user's email as verified via API

0 Likes
(4)

Hi,

We have half of our students accounts who have a verified email address, and the other half do not. We have been passing the 'send_confirmation' and 'force_self_registration' flags in our script, however only half our users have verified emails.

Could we get an API flag that we could pass a users SIS ID through, and it sets their email verification status to 'verified'?

Thanks for taking the time to read this 🙂

5 Comments
KristinL
Community Team
Community Team
Status changed to: Open
 
IanGoh1
Community Member

We have a similar issue; when creating a user via API , we can set:

  • user[skip_registration] : true
  • communication_channel[skip_confirmation] : true

However. update user[email] does not have those same flags.  So any email we sent via update are not confirmed automatically, and would require a person to go into their settings and confirm manually.

PaulJ2
Community Explorer

Having a way to set an email verification status to 'verified' would be very handy for us also.

Code-with-Ski
Community Participant

@CameronBarrett @IanGoh1 @PaulJ2 

Here is a potential workaround you can try with API's:

  • Verifying an unverified email address:
    • Use the Delete a communication channel for the unverified email address
    • Use Create a communication channel and set "skip_confirmation" to true
    • After doing this, you can ensure that the user's default email address is set to this email address with Edit a user
      • This may not be needed, but I would recommend testing with a few users to confirm the overall process works for you as expected.
  • To update a user to a new email address:
    • First, add the new email address as a communication channel with "skip_confirmation" to true using Create a communication channel
    • Then, use Edit a user to set their default email address to this new email address

It would be nice if there was a simpler process to manage this, but at least this works well enough.  After testing, you could also build a script or use Postman to help automate this process for multiple users when needed.

By the way, you should be able to use the user's SIS ID in these API calls rather than the Canvas user ID, by following the example in Object IDs, SIS IDs, and special IDs

  • /api/v1/users/sis_user_id:A1234/communication_channels
ProductPanda
Instructure
Instructure
Status changed to: Archived
Comments from Instructure

As part of the new Ideas & Themes process, all ideas in Idea Conversations were reviewed by the Product Team. Any Idea that was associated with an identified theme was moved to the new Idea & Themes space. Any Idea that was not part of the move is being marked as Archived. This will preserve the history of the conversations while also letting Community members know that Instructure will not explore the request at this time.