Note: In a recent product update,
Projects were renamed to Opportunities
Campaigns were renamed to Initiatives.
However, the code for the VOMO API/Webhooks
will continue to use the terms
Projects and Campaigns.
The VOMO Magic Login link can be used to generate a one-time use link to directly log in a specific user.
Note that if you plan to use this functionality that you will need to create functionality via the VOMO Client API that creates the user into your VOMO Account before being able to request an authentication token.
Creating A Link
To generate a Magic Link, send a POST request to the following endpoint:
/v1/users/one-timeIn the body of the request, include the following:
- email - The email address of the user to be logged in
- ip_address - The IP address of the user who will be clicking the link. This IP is verified once the link is clicked
-
landing_page (optional) - Specifies which page the user will land on after being successfully logged in. Options are limited to the following:
- hub - takes user to the Org's VOMO Hub
- resume - takes user to their Volunteer Resume (/user)
- admin - takes user to the admin dashboard (/admin)
- campaign - takes user to a specific campaign name (/<campaign_slug>
- admin_resume - takes Admin user to a user's Admin Volunteer Resume (/admin/volunteers/<user_id>
A full request to take the user to the Hub, Volunteer Resume, or Admin Dashboard might look something like this:
POST https://api.vomo.org/v1/users/one-time (note that staging environment is hosted at rey.vomo.org subdomain: https://rey.vomo.org/v1/users/one-time) {
"email": "email@example.com","ip_address": "127.0.0.1",
"landing_page": “hub”
}
A full request to take the user to a specific Campaign or an Admin Volunteer Resume might look something like this after you designate a resource to pass in a specific landing page.
POST https://api.vomo.org/v1/users/one-time (note that staging environment is hosted at rey.vomo.org subdomain: https://rey.vomo.org/v1/users/one-time) {
"email": "email@example.com","ip_address": "127.0.0.1",
"landing_page": “campaign” (or "admin_resume")
"resource": "<campaign_slug>" (or "<user_id>")
}
Responses
- A successful response will have the following format:
HTTP 201 {
"code": 201,"message": "Link Created",
"data": { "auth_link":
"https://app.vomo.org/magiclink/<link-token>"
} }
- A request with validation errors will have the following format:
HTTP 422 {
"status": "error","message": "Error",
"errors": { "email": [
"The email field is required."
] }
}
- A general error will have the following format:
HTTP 500 {
"message": "Error",
"errors": "Unable to create link."
}
- In the event you receive a general error message and you are not able to figure out why, please reach out and let us know.
Comments
0 comments
Please sign in to leave a comment.