# Identity & Access Management

Members are onboarded to SahamatiNet by creating a entity profile, with at least one user designated to manage the member or entity profile and secret.&#x20;

Here are the steps for a member to onboard.

* [Member & User Registration](/no-longer-relevent/sahamatinet/router.md#onboarding-process)
* Account Activation
  * [User](#user-account-activation)
  * [Member](#member-entity-activation)

### User Account Activation:

During onboarding, the designated user will receive an email with a link to verify their email address. Once verified, the user will be prompted to set up a password, finalizing the account activation process. Here are the main steps for activating a user account:

* [x] Verify email address
* [x] Set a password for the user account

### Member (Entity) Activation:

To fully activate a member on SahamatiNet, at least one associated user must be activated. This user will then begin the process of generating a secret, which is crucial for future API interactions. The key steps for member activation are as follows:

* [x] Activate the user account associated with the member.
* [x] Generate a secret for the member (entity).

Once the member onboarded on SahamatiNet, the below APIs can be used by the associated user to manage the secret.

### Scenario: Member Secret Management

1. **Generate User Access Token**: Use the [User Token Generate API](#user-token-generate) by providing email and password to get the access token. The access token should be used as the Authorization token for the steps below.
2. **Reset Member Secret**: Use the [Secret Reset API](#entity-secret-reset) by providing the entityId and Authorization token.
3. **Read Member Secret:** Use the [Secret Read API](#entity-secret-read) by providing the entityId and Authorization token to fetch the latest secret to use.

Below are the Base URL of each environment to use IAM APIs.

<table><thead><tr><th width="172">Environment</th><th>Base URL</th></tr></thead><tbody><tr><td>Production</td><td>https://api.sahamati.org.in/iam</td></tr><tr><td>UAT</td><td>https://api.uat.sahamati.org.in/iam</td></tr><tr><td>Sandbox</td><td>https://api.sandbox.sahamati.org.in/iam</td></tr></tbody></table>

## Token Generation APIs:

#### API Postman Collection:&#x20;

{% hint style="info" %}
We recommend you to use below postman collection to try out our Token-Service\[IAM] APIs
{% endhint %}

{% file src="/files/AOhDsrOYs3SEWfuEDLVo" %}

Below is the Sandbox Environment file for SahamatiNet Services

{% file src="/files/f7BJgqo2Kd0SC0Ix9y74" %}

{% openapi src="/files/gjX2IrAF9w69AKVACfQE" path="/user/token/generate" method="post" %}
[IAM-Service-Sprint-9.yaml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/zYPSph83Hfc1EyFzkrQt/IAM-Service-Sprint-9.yaml)
{% endopenapi %}

{% openapi src="/files/gjX2IrAF9w69AKVACfQE" path="/entity/token/generate" method="post" %}
[IAM-Service-Sprint-9.yaml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/zYPSph83Hfc1EyFzkrQt/IAM-Service-Sprint-9.yaml)
{% endopenapi %}

## Member Secret Management APIs

{% openapi src="/files/gjX2IrAF9w69AKVACfQE" path="/entity/secret/reset" method="post" %}
[IAM-Service-Sprint-9.yaml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/zYPSph83Hfc1EyFzkrQt/IAM-Service-Sprint-9.yaml)
{% endopenapi %}

{% openapi src="/files/gjX2IrAF9w69AKVACfQE" path="/entity/secret/read" method="post" %}
[IAM-Service-Sprint-9.yaml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/zYPSph83Hfc1EyFzkrQt/IAM-Service-Sprint-9.yaml)
{% endopenapi %}


---

# 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://developer.sahamati.org.in/no-longer-relevent/technical-specifications/identity-and-access-management.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.
