Linking to a project
There is two different ways for linking to a project:
Direct link
Linking to a project by redirecting user to a project URI and user sign in with their own credentials
URI: https://<im4>/iapi/projects/{projectId}/checkaccess/{clientid}
- Request-type:
GET - Parameters:
{projectId}(part of URI):IDof the project{client_id}(integer):<given client id>
Client id is included for security reasons. If user already has an app session running no credential page is shown – else user will be asked for credentials before access to project is checked and project is shown. If no access to project user is redirected home
Magic link
Request a magic project link through api and redirect user for auto sign in
URI: https://<im4>/project/{projectId}/magic-link?user={email}
- Request-type:
GET - Parameters:
{projectId}(part of URI):IDof the project
Api request is done including a user email. If specified user exist in app with exact same email and user has access to specified project, then a magic link is returned. Redirect user to that magic link and user is automatically signed in. Magic link works only once.
Access through magic links works when:
- User agency is same as project agency
- User agency is part of same agency group as project agency*
- User agency is part of same profile group as project agency (and profile agency is set to give
global access)
* If api client has user admin privileges then user will automatically be given access to agencies projects.
Magic link - ensure user
Same as Magic link, but if the API client has user admin privileges, linking can be done even if the user does not exist.
URI: https://<im4>/project/{projectId}/magic-link
- Request-type:
POST - Parameters:
{projectId}(part of URI): ID of the project{user}(string) (valid email, required, unique): Users email{firstname}(string) (required) : Users first name{lastname}(string) (required): Users last name{phone}(string): Users phone
The specified user is added as a contact person in the project's agency if they do not already exist.