> For the complete documentation index, see [llms.txt](https://id-docs.fsl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://id-docs.fsl.com/developers/fsl-id-sdk.md).

# 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
  }
});
```
