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

# Example Web SDK Integration

## Developer Console&#x20;

Acquire CLIENT-ID, CLIENT-SECRET, and set-up redirect URLs on the App Details page by registering your app through <https://developers.human-id.org/home/>.

## WebLoginUrl API Call

Create a view function that will perform a POST API request and render HTML:

```python
#YOUR_APP/views.py
def homepage(request):
    headers = {'client-id':'CLIENT_ID','client-secret':'CLIENT_SECRET'}
    response=requests.post('https://core.human-id.org/v0.0.3/server/users/web-login',headers=headers)
    data=response.json()
    return render(request,'trial/homepage.html',
    {
        'data':data
    })
```

Create a HTML page:

```markup
<!YOUR_APP/templates/homepage.html>
{%block content%}
<div>
<p>{{data}}</p>
<p><a href={{data.data.webLoginUrl}}>{% include 'anonymous-login.svg.html'%}</a></p>
</div>
{%endblock%}
```

## Callback URL

After a user successfully logs in through humanID. The user will be redirected to the URL specified in the developer console on the App Details page.

Create a function that will take the exchange token in that URL and make another API request to acquire a unique User ID.

```python
#YOUR_APP/views.py
def callback(request):
    headers = {'client-id':'CLIENT_ID','client-secret':'CLIENT_SECRET'}
    token = request.GET.get('et')
    response= requests.post('https://core.human-id.org/v0.0.3/server/users/exchange',headers= headers,data={'exchangeToken':token})
    data=response.json()
    return render(request,'trial/callback.html',
    {
        'data':data
    })

```
