Initializing help system before first use

# ins~login

Purpose
Initialize the package with the login details of the Insight server.
Synopsis
`procedure login(server:text, clientid:text, secret:text)`
`procedure login(server:text)`
`procedure login`
`procedure login(server:text, token_provider:function(string,text):integer)`
`procedure login(token_provider:function(string,text):integer)`
`procedure login(component:dmpresource)`
Arguments

server | The URL of the Insight server, e.g. "http://localhost:8080/"
clientid | The client ID value to use to authenticate with the Insight server
secret | The secret value to use to authenticate with the Insight server
component | A dmpresource initialized with details of an Insight DMP component.
token_provider | A function that will be called when the package requires an authorization token for communication with the Insight server. The first argument of the function will receive the URL of the Insight server and the second will be an initially empty text that must be populated with the token to use; the function should return the number of seconds for which the token is valid. The package will call the function again once this expires. return value of -1 indicates a token could not be obtained.

Further information
1. This subroutine will verify the Insight server URL / clientid / secret, and will fail if they are invalid or the Insight server is offline, unless the insightscenario_verifyonlogin parameter is set to false.
2. If the Insight server URL, client ID or secret are not passed to this procedure, the values of the insightscenario_url, insightscenario_clientid and insightscenario_secret parameters will be used. If the clientid/secret cannot be read from the parameters either and Mosel is running in unrestricted mode, they will be read from the local keystore.
3. When called from within an Insight app on DMP, if the Insight server URL is not passed to this procedure, and cannot be read from the insightscenario_url parameter, the package will log into the current DMP component as user account named solutionclient. You will need to ensure this account is added to your apps and given any authorities it requires to perform the operations you need.
4. Consult the 'Providing REST API credentials' section of this document for instructions on how to securely specify credentials through the secure storage on your platform.
5. Calling ins~login will overwrite any server URL or credentials saved by a previous call to ins~login
Parent Topic Authentication

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.