> For the complete documentation index, see [llms.txt](https://wiki.mobivate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.mobivate.com/mno-web-opt-in/mno-web-opt-in-nigeria.md).

# MNO Web Opt-In Nigeria

### User Detection & Subscription in Nigeria <a href="#user_detection_subscription_in_nigeria" id="user_detection_subscription_in_nigeria"></a>

To subscribe a user in Nigeria, for *Direct Carrier Billing*, we must perform two separate steps.

1. Redirect the user to the **MSISDN Detection platform** which will return to us ( *if successful* ) the Network and the User ID.
2. Call the [**Subscribe method** ](/mno-web-opt-in/mno-web-opt-in-nigeria/subscribing-the-user-to-the-service.md)on the API providing the UserID and the ServiceID.

### Requesting the UserID <a href="#requesting_the_userid" id="requesting_the_userid"></a>

To request the UserID, you should have the following information ready:

| Parameter         | Required? | Description                                                                                         |
| ----------------- | --------- | --------------------------------------------------------------------------------------------------- |
| Return URL        | Yes       | Your **FULL** URL, including the `http://... .` User will be sent back to this url upon completion. |
| MTN Product ID    | Yes       | Required for detecting MTN customers.                                                               |
| Your Reference ID | No        | Your own reference ID.                                                                              |

**Flow**: Redirect the user to the Lookup URL. Once the lookup is performed, user will be sent back to your *Return URL.*&#x20;

***Example***

```html
https://<hostname>/lookup/ng/?return=<RETURN_URL>&ad_id=<MTN_PRODUCT_ID>&ref_id=<YOUR_REFERENCE>
```

The user will return to the given Return URL with the following **(GET)** parameters appended.

| Attribute | Example                | Description                                                                                        |
| --------- | ---------------------- | -------------------------------------------------------------------------------------------------- |
| hostname  | hostname.mobivate.com  | Mobivate's content hostname.                                                                       |
| status    | success/failed         | Describing the status of the lookup.                                                               |
| userid    | abcd4321\_-$           | Returned only if status==success! An ASCII value unique to this subscriber, instead of the MSISDN. |
| network   | mtnng / etisalatng     | Returned only if status==success! Network name for the subscriber                                  |
| message   | failed to detect user! | Returned only if status==failed! Error description                                                 |

***Examples***

On Successful detection user will return to your domain:

```http
http://www.yourdomain.com/nigeria-user-detection?status=success&userid=$abcd1234$&network=etisalatngp
```

On failure, the user will return to your domain while also containing a message:

```http
http://www.yourdomain.com/nigeria-user-detection?status=failed&message=Failed+to+detect+UserID.
```
