diff --git a/callflows/authorization/backend.md b/callflows/authorization/backend.md index 3ac7cc0..439f760 100644 --- a/callflows/authorization/backend.md +++ b/callflows/authorization/backend.md @@ -13,7 +13,7 @@ The flow triggers as a POST request for an authorization from your application's Your application's backend needs to include the following parameters in the request body: - `login_hint`: The login hint to be used by the operator to identify the end-user, in the following format `:`, those being: - - `tel` for phone numbers. The `login_hint` must be a tel URI as defined in [RFC 3966](https://www.rfc-editor.org/info/rfc3966) for global phone numbers without visual separators in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en) format, including "+". For example, `tel:+34666666666` or `phone_number:+34666666666`. + - `tel` for phone numbers. The `login_hint` must be a tel URI as defined in [RFC 3966](https://www.rfc-editor.org/info/rfc3966) for global phone numbers without visual separators in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en) format, including "+". For example, `tel:+34666666666`. - `ipport` for IPv4 and IPv6 addresses, that can optionally include a port. For example, `ipport:80.90.34.2:16790`, `ipport:80.90.34.2`, `ipport:[2001:db8::1]:8080` or `ipport:[2001:db8::1]` - `scope`: The scope and purpose of the API call, according to the Open Gateway API product subscribed. It actually includes both the value for the W3C standard DPV purpose and a value for the scope in the following format `dpv:#`. You can find the proper value for this parameter, for each API, in the API Reference section. diff --git a/callflows/authorization/frontend.md b/callflows/authorization/frontend.md index 6631f9d..99e4b16 100644 --- a/callflows/authorization/frontend.md +++ b/callflows/authorization/frontend.md @@ -21,7 +21,7 @@ Your application's frontend needs to include the following parameters in the req > 📘 If your are using our Sandbox > An optional parameter, according to OpenID Connect, `login_hint` must be always passed with the end-user's phone number if you are testing on a production environment. This is a requirement for the Sandbox if you want to test on your real mobile line, which must be whitelisted for privacy reasons. Check the [Sandbox line whitelist](/docs/whitelist) guide for more information. > - `login_hint`: The login hint to be used by the operator to identify the end-user, in the following format `:`, those being: -> - `tel` or `phone_number` for phone numbers. The `login_hint` must be a tel URI as defined in [RFC 3966](https://www.rfc-editor.org/info/rfc3966) for global phone numbers without visual separators in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en) format. For example, `tel:+34666666666` or `phone_number:+34666666666`. +> - `tel` for phone numbers. The `login_hint` must be a tel URI as defined in [RFC 3966](https://www.rfc-editor.org/info/rfc3966) for global phone numbers without visual separators in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I/en) format. For example, `tel:+34666666666`. > - `ipport` for IPv4 and IPv6 addresses, that can optionally include a port. For example, `ipport:80.90.34.2:16790`, `ipport:80.90.34.2`, `ipport:[2001:db8::1]:8080` or `ipport:[2001:db8::1]` #### Handling the response diff --git a/catalog/devicelocation/samplecode_devicelocation.md b/catalog/devicelocation/samplecode_devicelocation.md index f638a4b..70761e0 100644 --- a/catalog/devicelocation/samplecode_devicelocation.md +++ b/catalog/devicelocation/samplecode_devicelocation.md @@ -104,7 +104,7 @@ myHeaders.append("Content-Type", "application/x-www-form-urlencoded"); myHeaders.append("Authorization", `Basic ${appCredentials}`); const urlencoded = new URLSearchParams(); -urlencoded.append("login_hint", `phone_number:${customerPhoneNumber}`); +urlencoded.append("login_hint", `tel:${customerPhoneNumber}`); urlencoded.append("scope", apiScope); const requestOptions = { @@ -161,7 +161,7 @@ String apiScope = "dpv:FraudPreventionAndDetection#device-location-read"; HttpClient client = HttpClient.newHttpClient(); Map data = new HashMap<>(); -data.put("login_hint", "phone_number:" + customerPhoneNumber); +data.put("login_hint", "tel:" + customerPhoneNumber); data.put("scope", apiScope); StringBuilder requestBody = new StringBuilder(); @@ -232,7 +232,7 @@ headers = { } data = { - "login_hint": f"phone_number:{customer_phone_number}", + "login_hint": f"tel:{customer_phone_number}", "scope": api_scope } @@ -403,7 +403,7 @@ const params = { response_type: "code", scope: apiScope, redirect_uri: myCallbackEndpoint, - login_hint: `phone_number:${userPhoneNumber}`, + login_hint: `tel:${userPhoneNumber}`, state: encodeURIComponent(JSON.stringify(deviceLocationParams)) // Using `state` as the parameter that is always forwarded to the redirect_uri }; @@ -447,7 +447,7 @@ fetch(url, requestOptions); accuracy: parseFloat(accuracy) }; - document.getElementById('login_hint').value = 'phone_number:' + phoneInput; + document.getElementById('login_hint').value = 'tel:' + phoneInput; document.getElementById('state').value = encodeURIComponent(JSON.stringify(deviceLocationParams)); document.getElementById('apiRequestForm').submit(); diff --git a/catalog/devicestatus/samplecode_devicestatus.md b/catalog/devicestatus/samplecode_devicestatus.md index cef6275..1096351 100644 --- a/catalog/devicestatus/samplecode_devicestatus.md +++ b/catalog/devicestatus/samplecode_devicestatus.md @@ -94,7 +94,7 @@ myHeaders.append("Content-Type", "application/x-www-form-urlencoded"); myHeaders.append("Authorization", `Basic ${appCredentials}`); const urlencoded = new URLSearchParams(); -urlencoded.append("login_hint", `phone_number:${customerPhoneNumber}`); +urlencoded.append("login_hint", `tel:${customerPhoneNumber}`); urlencoded.append("scope", apiScope); const requestOptions = { @@ -151,7 +151,7 @@ String apiScope = "dpv:FraudPreventionAndDetection#device-status-roaming-read"; HttpClient client = HttpClient.newHttpClient(); Map data = new HashMap<>(); -data.put("login_hint", "phone_number:" + customerPhoneNumber); +data.put("login_hint", "tel:" + customerPhoneNumber); data.put("scope", apiScope); StringBuilder requestBody = new StringBuilder(); @@ -222,7 +222,7 @@ headers = { } data = { - "login_hint": f"phone_number:{customer_phone_number}", + "login_hint": f"tel:{customer_phone_number}", "scope": api_scope } @@ -383,7 +383,7 @@ const params = { response_type: "code", scope: apiScope, redirect_uri: myCallbackEndpoint, - login_hint: `phone_number:${userPhoneNumber}`, + login_hint: `tel:${userPhoneNumber}`, state: encodeURIComponent(JSON.stringify(deviceStatusParams)) // Using `state` as the parameter that is always forwarded to the redirect_uri }; @@ -421,7 +421,7 @@ fetch(url, requestOptions); phone_number: phoneInput }; - document.getElementById('login_hint').value = 'phone_number:' + phoneInput; + document.getElementById('login_hint').value = 'tel:' + phoneInput; document.getElementById('state').value = encodeURIComponent(JSON.stringify(deviceStatusParams)); document.getElementById('apiRequestForm').submit(); diff --git a/catalog/deviceswap/samplecode_deviceswap.md b/catalog/deviceswap/samplecode_deviceswap.md index da32e4c..4c9501b 100644 --- a/catalog/deviceswap/samplecode_deviceswap.md +++ b/catalog/deviceswap/samplecode_deviceswap.md @@ -92,7 +92,7 @@ myHeaders.append("Content-Type", "application/x-www-form-urlencoded"); myHeaders.append("Authorization", `Basic ${appCredentials}`); const urlencoded = new URLSearchParams(); -urlencoded.append("login_hint", `phone_number:${customerPhoneNumber}`); +urlencoded.append("login_hint", `tel:${customerPhoneNumber}`); urlencoded.append("scope", apiScope); const requestOptions = { @@ -149,7 +149,7 @@ String apiScope = "dpv:FraudPreventionAndDetection#device-swap"; HttpClient client = HttpClient.newHttpClient(); Map data = new HashMap<>(); -data.put("login_hint", "phone_number:" + customerPhoneNumber); +data.put("login_hint", "tel:" + customerPhoneNumber); data.put("scope", apiScope); StringBuilder requestBody = new StringBuilder(); @@ -220,7 +220,7 @@ headers = { } data = { - "login_hint": f"phone_number:{customer_phone_number}", + "login_hint": f"tel:{customer_phone_number}", "scope": api_scope } @@ -369,7 +369,7 @@ const params = { response_type: "code", scope: apiScope, redirect_uri: myCallbackEndpoint, - login_hint: `phone_number:${userPhoneNumber}`, + login_hint: `tel:${userPhoneNumber}`, state: encodeURIComponent(JSON.stringify({phoneNumber: userPhoneNumber})) // Using `state` as the parameter that is always forwarded to the redirect_uri }; @@ -403,7 +403,7 @@ fetch(url, requestOptions); function submitForm() { var phoneNumber = document.getElementById('phone_number').value; - document.getElementById('login_hint').value = 'phone_number:' + phoneInput; + document.getElementById('login_hint').value = 'tel:' + phoneInput; document.getElementById('state').value = encodeURIComponent(JSON.stringify({ phoneNumber: phoneNumber })); document.getElementById('apiRequestForm').submit(); diff --git a/catalog/knowyourcustomer/samplecode_knowyourcustomer.md b/catalog/knowyourcustomer/samplecode_knowyourcustomer.md index 368c637..523bb41 100644 --- a/catalog/knowyourcustomer/samplecode_knowyourcustomer.md +++ b/catalog/knowyourcustomer/samplecode_knowyourcustomer.md @@ -92,7 +92,7 @@ myHeaders.append("Content-Type", "application/x-www-form-urlencoded"); myHeaders.append("Authorization", `Basic ${appCredentials}`); const urlencoded = new URLSearchParams(); -urlencoded.append("login_hint", `phone_number:${customerPhoneNumber}`); +urlencoded.append("login_hint", `tel:${customerPhoneNumber}`); urlencoded.append("scope", apiScope); const requestOptions = { @@ -149,7 +149,7 @@ String apiScope = "dpv:FraudPreventionAndDetection#kyc-match:match"; HttpClient client = HttpClient.newHttpClient(); Map data = new HashMap<>(); -data.put("login_hint", "phone_number:" + customerPhoneNumber); +data.put("login_hint", "tel:" + customerPhoneNumber); data.put("scope", apiScope); StringBuilder requestBody = new StringBuilder(); @@ -220,7 +220,7 @@ headers = { } data = { - "login_hint": f"phone_number:{customer_phone_number}", + "login_hint": f"tel:{customer_phone_number}", "scope": api_scope } @@ -436,7 +436,7 @@ const params = { response_type: "code", scope: apiScope, redirect_uri: myCallbackEndpoint, - login_hint: `phone_number:${userPhoneNumber}`, + login_hint: `tel:${userPhoneNumber}`, state: encodeURIComponent(JSON.stringify(kycMatchParams)) // Using `state` as the parameter that is always forwarded to the redirect_uri }; @@ -480,7 +480,7 @@ fetch(url, requestOptions); postalCode: postalCode }; - document.getElementById('login_hint').value = 'phone_number:' + phoneInput; + document.getElementById('login_hint').value = 'tel:' + phoneInput; document.getElementById('state').value = encodeURIComponent(JSON.stringify(kycMatchParams)); document.getElementById('apiRequestForm').submit(); diff --git a/catalog/simswap/samplecode_simswap.md b/catalog/simswap/samplecode_simswap.md index 665985e..648dd96 100644 --- a/catalog/simswap/samplecode_simswap.md +++ b/catalog/simswap/samplecode_simswap.md @@ -102,7 +102,7 @@ myHeaders.append("Content-Type", "application/x-www-form-urlencoded"); myHeaders.append("Authorization", `Basic ${appCredentials}`); const urlencoded = new URLSearchParams(); -urlencoded.append("login_hint", `phone_number:${customerPhoneNumber}`); +urlencoded.append("login_hint", `tel:${customerPhoneNumber}`); urlencoded.append("scope", apiScope); const requestOptions = { @@ -159,7 +159,7 @@ String apiScope = "dpv:FraudPreventionAndDetection#sim-swap"; HttpClient client = HttpClient.newHttpClient(); Map data = new HashMap<>(); -data.put("login_hint", "phone_number:" + customerPhoneNumber); +data.put("login_hint", "tel:" + customerPhoneNumber); data.put("scope", apiScope); StringBuilder requestBody = new StringBuilder(); @@ -229,7 +229,7 @@ headers = { } data = { - "login_hint": f"phone_number:{customer_phone_number}", + "login_hint": f"tel:{customer_phone_number}", "scope": api_scope }