Fabric Digits - userID in DGTContactsFetcher is always nil for users on Digits - twitter-digits

we have an issue we dont know how to deal with, we started using DIGITS from fabric to login users with SMS, the login works fine we get the usersID's that have installed the app using the lookupContactMatches function.
but when we use
Digits.sharedInstance().createContactsFetcher().fetchContactsOnly(inApp: false, withCompletion: { [weak self] (contact, error) in
we get all the users contacts but none of them obtain a digit userID. so basically we cant know who from the user contacts has the app. i couldn't find any information or a way to contact Digits from fabric, any help is appreciated!

Related

How to get the user's phone number using react-google-login?

I'm actually using this React library (https://www.npmjs.com/package/react-google-login) to authenticate with Google.
As for the basic profile and email scopes, this works fine. On my client app on Google Cloud Platform, I've correctly enabled the People API (https://developers.google.com/people) and added the correct scope to the scope list, in React (https://www.googleapis.com/auth/user.phonenumbers.read). I've also ensured that my phone number on my Google Profile was made public even if I don't know if that could matter. After doing all this, the consent screen is working fine asking me to allow the app to access my phone number.
However after login, I can only see the data linked to profile and email scopes. In the library I can see that they made some object properties as shown in the code below inside the library itself :
function handleSigninSuccess(res) {
/*
offer renamed response keys to names that match use
*/
const basicProfile = res.getBasicProfile()
const authResponse = res.getAuthResponse(true)
res.googleId = basicProfile.getId()
res.tokenObj = authResponse
res.tokenId = authResponse.id_token
res.accessToken = authResponse.access_token
res.profileObj = {
googleId: basicProfile.getId(),
imageUrl: basicProfile.getImageUrl(),
email: basicProfile.getEmail(),
name: basicProfile.getName(),
givenName: basicProfile.getGivenName(),
familyName: basicProfile.getFamilyName()
}
onSuccess(res)
}
\
So the problem is that I don't know if I even receive the phone data or if I just can't read it because I don't know how to call the phone data inside the response, in terms of variables name in React. Anyone has an idea ?
The library you're using seems to be using Google Identity which does not include a method to obtain the user's phone number, just their basic profile.
You can get the user's phone number with the people api but this is not in the scope of this library. You'd have to make your own method to get the the authenticated user profile with the phoneNumbers field. Enabling the people api and requesting authorization are just the first steps.
https://developers.google.com/people/api/rest/v1/people/get

IBMQProvider issue

I successfully installed and ran a couple of circuits on a backend the other day (essex).
Everything was ok, results came up, but the next day, once I wanted more QC, I could not manage to get a provider.
I have looked into my account (active), looked into the package (up-to-date), and a new file in the project. I also already disabled and enabled the account without problems, but I keep having this error.
Code
from qiskit import IBMQ
IBMQ.active_account()
IBMQ.providers()
provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
and I get:
>~/my_environment_name/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqfactory.py in get_provider(self, hub, group, project)
425 raise IBMQProviderError('No provider matches the specified criteria: '
426 'hub = {}, group = {}, project = {}'
--> 427 .format(hub, group, project))
428 if len(providers) > 1:
429 raise IBMQProviderError('More than one provider matches the specified criteria.'
IBMQProviderError: 'No provider matches the specified criteria: hub = ibm-q, group = open, project = main'
I would like to know where I am wrong, I look forward to keep learning thru the backends efficiently.
Thank you in advance
This means that there is no provider that matches all the criteria you specified, so in that hub, group and project. This could be because your account hasn't loaded correctly, so check to see if anything is returned from IBMQ.providers(). If there isn't anything load your account using IBMQ.load_account(). The other issue could be that there are genuinely no backends that meet those criteria, so try running IBMQ.get_provider() instead.
Try to use API token to enable your IBMQ account.
from qiskit import IBMQ
provider = IBMQ.enable_account("your-api-key") # We load our account
provider.backends() # We retrieve the backends to check their status
for b in provider.backends():
print(b.status().to_dict())
Create IBM Quantum account if you don't have one, then use the API token that available in the dashboard as enable_account() method argument to resolve this issue.
For More: https://quantum-computing.ibm.com/lab/docs/iql/manage/account/ibmq
https://quantum-computing.ibm.com/
https://www.ibm.com/account/reg/us-en/signup?formid=urx-19776&target=https%3A%2F%2Flogin.ibm.com%2Foidc%2Fendpoint%2Fdefault%2Fauthorize%3FqsId%3D70b061b4-7c64-4545-a504-a8871f2d414f%26client_id%3DN2UwMWNkYmMtZjc3YS00

Salesforce: How do I get RingCentral extension number of receiver

I've installed RingCentral app and want to create cases based on conditions on extension number of receiver.
A new task automatically gets created once you receive any call, I am going to write trigger to generate cases if receiver's extension matches my criteria.
Please let me know any workaround to get receiver extension number.
Thanks
I am not sure what you meant by saying that you have installed RingCentral app?
But if you somehow have the phone number (from an incoming call, in coming sms, call-log etc.) and you want to detect the extension number of that phone number. Then the first requirement is that, that phone number must belong to the same RingCentral account you are logged in. The second requirement is you must login with the main account number of with an extension that has the Super Admin role. Below is some code in node JS to get extension number.
var incallNumber = "+1234567890"
platform.get('/account/~/phone-number', {
usageType: 'DirectNumber'
})
.then(function(resp){
console.log(resp)
var json = resp.json()
for (var record of json.records){
//if (incallNumber == record.phoneNumber){
console.log('Phone number: ' + record.phoneNumber)
if (record.extension.hasOwnProperty('extensionNumber'))
console.log('Extension number: ' + record.extension.extensionNumber)
else
console.log('No extension number')
console.log('---')
//}
}
})
You can then replace the incallNumber with your number and uncomment the if condition to match them.
Hope this helps.

IBM Watson - How to get login from user with Regex

I'm working with IBM Watson API's a few months ago.
I want to know more about Regex inside the Conversation Service. And how to get the login from the user, if they type some like:
My login is sayuri.mizuguchi!
My login? ooh, is sayuri.mizuguchi
The default is always firstname.lastname.
I want use input.text.find to get the login, and with one context variable I'll save the login, like:
{
"context": {
"loginUser": <? input.text ?>
},
Simon did the same but with other data, 11 numbers and works amazingly.
In this case I'll use just input.text because my input.text.find inside the node with IF condition will extract my data.
I find this solution with regex, #revo help with one example.
Try this inside the if condition:
input.text.find('\w+\.\w')
And only if user types login, the conversation will flow.

How to validate if the Google Plus profile exists?

I have combined Admin SDK Directory API with the Google+ Domains API to fetch all the Google plus profile information.
But , There are people who do not have Google Plus profile in our organization which generates a null pointer Exception,I also tried the below code to validate
Person profile = plus.people().get(directorylist.getId()).execute();
if(!profile.isEmpty())
{
System.out.println(profile.getDisplayName());
profile.getImage().getUrl();
profile.getSkills();
System.out.println("SKILL="+profile.getSkills());
System.out.println("ORG="+profile.getOrganizations());
}
But the validation is not working and it is throwing null pointer Exception . Let me know if anyone has a better solution to this problem
You want:
public abstract boolean isPlusUser()
source

Resources