# FSL ID SDK

## JS SDK

Compatible with browser, app integration.

### How to install

Use `npm` to install the JS SDK, check <https://www.npmjs.com/package/fsl-authorization> for details

### Getting Started

Demo code to integrate with the JS SDK

```javascript
import { FSLAuthorization } from 'fsl-authorization';

const fslAuthorization = window.FSLAuthorization.init({
  responseType: 'code', // 'code' or 'token'
  appKey: 'Your APP KEY',
  redirectUri: 'Your Redirect URL', // https://xxx.xxx.com
  scope: 'basic,wallet', // Grant Scope
  state: 'test',
  usePopup: true // Popup a window instead of jump to
});

fSLAuthorization.signIn().then((code) => {
  if (code) {
    // Implement your code here
  }
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://id-docs.fsl.com/developers/fsl-id-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
