Getting started
auth()
Reference for user() and requireUser().
1 min read
Service obtained with sdk.auth().
user()
await sdk.auth().user()No parameters.
Returns: a Promise with the JSON returned by api/auth/me (the user
profile when there is an active session).
Error conditions
- The promise rejects, for example, when the request does not complete (network or CORS) or when the response is not valid JSON.
Minimal example
<script type="module">
async function main() {
const sdk = new window.I6Sdk();
const user = await sdk.auth().user();
console.log(user);
}
main();
</script>requireUser()
await sdk.auth().requireUser()No parameters.
Returns: a Promise with the result of user(). When that result is empty
(for example null), it starts the redirect to login and returns null.
Error conditions
- The same as
user().
Minimal example
<script type="module">
async function main() {
const sdk = new window.I6Sdk();
const user = await sdk.auth().requireUser();
if (!user) return;
}
main();
</script>Notes
requireUser()usesuser()internally.- The login URL is described in Login flow.
Next
ingest()
File upload.
Support
Implementation support
Official channels for questions during integration.
Technical support email
Response within 1 business day
Send implementation questions with the context of your current step.
Send emailResponse according to the support queue
Direct assistance for quick integration questions.
Support assistant
Immediate response
i6 documentation and implementation assistant.
