# setUserConsent
Source: [https://docs.qualcomm.com/doc/80-PK177-134/topic/set_user_consent.html](https://docs.qualcomm.com/doc/80-PK177-134/topic/set_user_consent.html)
Indicates if the application has obtained end user consent about crowdsourcing,
which is a mandatory requirement to be able to use the network positioning APIs.
setUserConsent()Copy to clipboard
## Parameters
| **Parameter** | **API type** | **Data type** | **Description** |
| --- | --- | --- | --- |
| consentAccepted | Java | boolean | Indicates whether user consent is accepted or
rejected. |
| consentAccepted | Native | boolean | Indicates whether user consent is accepted or
rejected. |
| ret | Native | gtp\_LocationStatus& | On success this is the actual return value from the API.
See [LocationStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/gtp_location_status.html). |
| | | | |
## Returns
| Return | API type | Data type | Description |
| --- | --- | --- | --- |
| response | Java | LocationStatus | [LocationStatus](https://docs.qualcomm.com/doc/80-PK177-134/topic/gtp_location_status.html) |
| response | Native | qesdk\_transaction\_status | See [QESDK transaction status for Native APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/native_qesdk_class.html) for usage details. Use qesdk\_transaction\_status to confirm API call invocation. If successful, use the `ret` value for the actual API return value object. |
| | | | |
**Parent Topic:** [GTP subsystem APIs](https://docs.qualcomm.com/doc/80-PK177-134/topic/gtp_subsystem_apis.html)
Last Published: Nov 14, 2024
[Previous Topic
removePassiveNetworkLocationUpdates](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/remove_passive_network_location_updates.md) [Next Topic
GTP subsystem callback interfaces](https://docs.qualcomm.com/bundle/publicresource/80-PK177-134/topics/gtp_subsystem_callback_interfaces.md)