I am trying to integrate Twilio with my Salesforce account, but I'm not sure how to go about it.
I followed the instructions on this page: https://developer.salesforce.com/page/Lightning_Open_CTI
I've uncommented the Twilio related code inside SoftphoneProviderHelper.
Also, inside Custom Settings, I've input my Twilio Account Sid and token.
But, I'm still unable to make/receive calls. What am I missing?
Related
I am trying to integrate Microsoft Graph API with my Django backend application. I want to be able to read, manage and send emails on behalf of users.
The frontend is built with React
My issue now is how the authorization flow will work. I want users to authorize the app(prolly using Oauth) on the frontend after which I will get some kind of access code that I can save on the backend and subsequently use to make requests to the graph APIs on the user's behalf
Pls, how do I achieve this flow ??
Any help will be appreciated. I have been scrambling through the docs all day, need someone to point me in the right direction
Get access on behalf of a user:
Follow this documentation for more information: https://learn.microsoft.com/en-us/graph/auth-v2-user
Is there any way to send OTP only using React(with Vonage or Twilio)?
Twilio developer evangelist here.
If you are looking to send an OTP via SMS using a service like Twilio then you will need a back-end of some sort. That back-end does not have to be written in Node.js, you just need a server-side component.
The reason for this is that Twilio, and other APIs, give you a secret, in Twilio's case it is called an Auth Token, that authenticates you with the API and lets your account send those messages. If you try to make calls to the API directly from within your React application, you would expose that Auth Token and a malicious user could take it and use it to abuse your account.
I wrote a post on how to send SMS messages using React, Twilio and Node.js that might help you.
If you are trying to send OTP codes, you might find that the Twilio Verify API is actually better suited for this. It is a dedicated API for sending and verifying OTP codes. This blog post shows you how to build your own Verify service using Twilio Functions. The benefit of Twilio Functions is that you don't need to run your own servers, you can host the functions in Twilio's infrastructure.
Let me know if this helps at all.
I am implementing facebook login in my react website. I am following facebook documentation here
It's all fine, the only issue is, the response is an access token. I want to receive a one time code, then exchange it for an access token on the server side.
I don't want to manually build the login flow as described here, which indeed gives you a code, but It includes user redirecting. I prefere the facebook dialog using the javascript sdk.
So, Is there a way to get a one time code using the facebook javascript sdk ?
I have been able to get the access token from the Google APP i created using oauth 2.0 flow .
Can someone help me to figure how i can now use this access token to log in into Gmail directly without asking user to fill the credentials again?
Till now i tried googling and reading all the document related to oauth 2.0 and did not discover anything
https://mail.google.com/accounts/TokenAuth?auth=[TOKEN]&continue=https://mail.google.com/&service=mail&source=[YOUR_APP_NAME]
Tried above with no luck where auth=refresh token.
You cant get the user email threads with those scopes. In fact there is only one simple inbox feed that google provides (with another scope). To really get the users email threads you need to use imap with oauth, or use google apps script with a published service url.
I'm pretty new to SalesForce and their Apex language. I've been reading some documentation and tried the integration between Google and SalesForce.
I'm wondering is it possible to emulate an auth token from google to SalesForce?
I'm trying to read a google spreadsheet and then fill up a SalesForce object automatically. The user login will always be the same/universal for this spreadsheet, so I have the credentials required to login.
I am working off of the sample that requires a visualforce, and I'm wondering how would I automatically do the session id token that the google spreadsheet API requires.
Any ideas?
The old-school, hard way would be to send a login() call to the API (available through SOAP messages). Salesforce API is well documented and plenty of examples are available (both in programming languages and for raw XML requests/responses).
But I have no idea what possibilities you have from Google side, if it's only JavaScript then you might not be able to send and retrieve AJAX-like calls to another domain...
Recently another option emerged and that is REST API (no SOAP needed). Looks more promising and easier in my opinion. Quick intro is available here and you'll find more documentation on the bottom of the page.
Last but not least - 2 interesting links:
http://code.google.com/apis/gdata/articles/salesforce.html for some integration tutorial
and built-in integration offered by Salesforce: http://www.salesforce.com/assets/pdf/datasheets/SalesforceGoogleApps.pdf
I've used custom settings to do this. Use OAuth to get a token for Google, then store that token in Salesforce custom settings (Setup-Develop-Custom Settings). You can then retrieve the token for callouts to Google from that custom setting for any user needing access to Google Apps. The downside is, every user will authenticate as your custom setting token user. The upside is that they won't need to individually authenticate. Custom settings are retrievable via Apex using a simple getter, and live as Apex-like objects.
Also keep in mind, Google requires each service to use it's own token. So, if your user wants to use Calendars and Spreadsheets, that's two separate tokens that will need to be stored and retrieved for the callout.
I generally allow users to create their own authenticated session tokens via OAuth if they want to do that, then failover to the custom settings to get the general admin token if necessary.
Are you trying to log into Google Apps from SFDC? There are options for Google Apps within Salesforce, go to Setup > Administration Setup > Google Apps > Settings. I've not used this and it requires some setup, but thought I'd point it out. Aside from that I can only blurt out OAuth (getting users to authenticate with Google from within Salesforce when trying to access Google Apps) and SSO (which I know can be used to authenticate from an external system, though not sure if it works the other way).
Look into the "Named Credentials" menu in salesforce setup.
There, you can store auth credentials for the services accessed via Apex:
"A named credential specifies a callout endpoint and its required authentication parameters. When setting up callouts, avoid setting authentication parameters for each callout by referencing named credentials."
a username/pass combo can be used, or a certificate, or an AWS signature, and there is a JWT option..
Help docs: https://help.salesforce.com/articleView?id=named_credentials_about.htm&type=5