Retrieve data-sharing consent
import requests
url = "https://api.datagrid.com/v1/identity/data-sharing-opt-in"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/identity/data-sharing-opt-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/identity/data-sharing-opt-in \
--header 'Authorization: Bearer <token>'{
"object": "data_sharing_opt_in",
"consent": true,
"effective_consent": true,
"reason": "disabled_by_administrator"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Identity
Retrieve data-sharing consent
Returns the authenticated user’s data-sharing consent together with the effective consent after administrator settings are applied. When effective_consent is false with reason disabled_by_administrator, feedback is not shared regardless of consent, so clients should hide the consent prompt and feedback controls.
GET
/
identity
/
data-sharing-opt-in
Retrieve data-sharing consent
import requests
url = "https://api.datagrid.com/v1/identity/data-sharing-opt-in"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/identity/data-sharing-opt-in', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/identity/data-sharing-opt-in \
--header 'Authorization: Bearer <token>'{
"object": "data_sharing_opt_in",
"consent": true,
"effective_consent": true,
"reason": "disabled_by_administrator"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Response
Data-sharing consent for the caller