This is another installment in my ongoing Slack and Salesforce integration series.
In part 2 (Slash Commands) and part 3 (Bots), I used an “integration user” to access Salesforce on behalf of Slack users. In other words, all Slack users connected to Salesforce using the same Salesforce user. This may be fine in some cases where everybody shares a common data set, but in most cases, you want Slack users to authenticate with Salesforce individually so that Slack requests execute in the specific context of the user, with the right set of permissions.
Slack doesn’t have built-in authentication for Salesforce, but it’s easy to implement a custom authentication process which I’ll demonstrate in this article.
Watch the video to see the custom authentication process in action:
Architecture
In part 2, I described how to create a lightweight Node.js app that acts as a message broker between Slack and Salesforce. To implement our custom authentication process, we will add some code to the Node.js app to maintain a mapping between Slack user ids and Salesforce access tokens.
Here is the high level flow:
- Slack passes the Slack user id with each request to the service that implements a Slash Command, and with each message to Bots.
- When a request comes in, we check if we already have a Salesforce access token for the provided Slack user id.
- If we do, we call the Salesforce REST API using that token.
- If we don’t, we return a link that the user can click to authenticate with Salesforce using OAuth.
Notice that the link includes the Slack User Id that is passed along throughout the OAuth process. You could encrypt that user id for additional security.
- At the end of the OAuth process, we will have both the Slack user id and a Salesforce access token. We store that mapping at the server-side so that the next time the user makes a request, we can retrieve the access token and use it to make the REST call to Salesforce.
- If the token becomes invalid, the REST call returns a 401 (not authorized) error, and we again present the login link to the user.
Source Code
The source code is available in this GitHub repository.
Code Highlights:
- In this example, I keep track of the Slack User Id / Salesforce access token mappings in memory (see slack-salesforce-auth.js for details). In other words, Slack users will have to re-login to Salesforce if the Node.js app is restarted. You could also persist the tokens in a database. In that case you should encrypt the tokens before storing them.
- The current version of the application doesn’t implement a refresh token workflow. When the token expires, the user will be presented with the login link again.
- Slack also passes the integration token with each request. You should always verify that token before you handle the request to make sure an unauthorized user that gained access to a Slack user id can’t access Salesforce information by accessing the Node.js endpoint directly. For example, here is how I check the token for the /contact Slash command:
let CONTACT_TOKEN = process.env.SLACK_CONTACT_TOKEN; if (req.body.token != CONTACT_TOKEN) { return res.send("Invalid token"); }
Additional Resources
Also check out the Slack/Salesforce integration in the DreamHouse sample app.
It was effective subject
# طراحی وب سایت باید گویا و حرفه ای باشد و در نگاه اول متوجه کسب و کار مورد نظر بشویم .
# مدیریت آسان و کامل وب سایت (مدیر به راحتی تمام اجزا سایت را بتواند مطابق با سلیقه خود تغییر دهد و نیاز به تماس با کارشناس مربوطه نباشد)
# ظاهر گرافیکی جذاب و قابل قبول و حرفه ای داشته باشد.
# مشتری در کمترین زمان به اطلاعاتی که در مورد کسب و کار شما نیاز دارد دسترسی پیدا کند.
# وب سایت در دستگاه های مختلف (موبایل ، تبلت ، و ….) به درستی نمایش داده شود
# سرعت باز شدن صفحات وب سایت زیاد باشد
.# قابل بهینه سازی برای موتورهای جستجو است
# کدنویسی صحیح و سبکی دارد و از cms های اوپن سورس مثل وورد پرس و جوملا استفاده نشده باشد
# یک ووب سایت حرفه ای امنیت بالایی دارد
Endnote x8 crack
Love y’all .
Very informative article i must say. Keep writing and liteblue gov is one of the best postal services out there in our country.
Thanks for sharing this amazing post with us.
Hadoop Training Institute in Noida
Best Hadoop Training in Noida
Can anyone help me create new channels in slack when a record is created in salesforce?
This is an amazing information for Slack.This information is very helpful for us.visit
,mobile
app development for excellent tips and techniques. We are really thankful for this post.
Thanks For the info Afribaze
https://afribaze.com.ng
Latest 2018 olamide songs Download Latest 2018 wizkid songs The Latest 2018 davido songs Get Latest 2018 patoraking songs For Latest 2018 nigeria songs Download Latest 2018 naija videos The Latest 2018 davido Albums Free Latest 2018 musics Davido Download starboy album
Very informative sir. https://legacytips.com/refer24-com-ng-review-nigerias-no-1-refer-and-earn-platform/
Very informative article i must say. Keep writing and liteblue gov is one of the best postal services out there in our country.
You can easily from here.download EMUS4U APP on iOS
Latest 2018 olamide songs Download Latest 2018 wizkid songs The Latest 2018 davido songs Get Latest 2018 patoraking songs For Latest 2018 nigeria songs Download Latest 2018 naija videos The Latest 2018 davido Albums Free Latest 2018 musics Davido Download starboy album here
İzmir avukatlık görevi ile birçok kişiye yardımcı olan Deniz Hukuk Bürosu hizmetlerine çeşitli dava mecralarında da devam etmektedir bunlardan bazıları; | hasta hakları davası | boşanma sebepleri ve sonuçları | avukat danışmanlığı | ağır ceza davaları vb. gibi alanlarda sizleri hukuk karşısında en iyi şekilde temsil sağlamaktayız
İzmir avukatlık görevi ile birçok kişiye yardımcı olan Deniz Hukuk Bürosu hizmetlerine çeşitli dava mecralarında da devam etmektedir bunlardan bazıları; | Karşıyaka avukat olarak hizmetlerimiz, İzmir tahliye davaları | İzmir nüfus davaları | izmir miras hukuku davaları vb. gibi alanlarda sizleri hukuk karşısında en iyi şekilde temsil etmekteyiz.
Deniz Hukuk Bürosu izmir avukatlık görevi ile birçok kişiye yardımcı olmaktadır. Çeşitli dava mecralarında da hizmetine devam etmektedir ve bunun yanında web sitemizde yer verdiği haber başlıklarından; | İcra hukukunda süreler ve şikayet | Boşanma Kavramı, Boşanmanın Sebepleri ve Sonuçları | İcra ve İflas Hukuku – İcra Teşkilatı
| Hasta Hakları vb. gibi haberler v e duyurular ile sizleri hukuk karşısında en iyi şekilde temsil edilmektedir.
Deniz Hukuk Bürosu izmir avukatlık görevi ile birçok kişiye yardımcı olmaktadır. Çeşitli dava mecralarında da hizmetine devam etmektedir ve bunun yanında web sitemizde yer verdiği haber başlıklarından bazıları; | İcra hukukunda süreler ve şikayet | Boşanma Kavramı, Boşanmanın Sebepleri ve Sonuçları | İcra ve İflas Hukuku – İcra Teşkilatı
| Hasta Hakları vb. gibi haberler v e duyurular ile sizleri hukuk karşısında en iyi şekilde temsil etmektedir.
Çakıroğlu Nakliyat, Asansörlü nakliyat | Ofis taşımacılığı | Piyano taşımacılığı | Buca evden eve nakliyat | Karşıyaka evden eve nakliyat | İzmir eşya depolama vb. hizmetleri en kaliteli ve profesyonel şekilde müşterilerine sunuyor olmaktadır.
İzmir evden eve nakliyat firması olarak hizmet veren Çakıroğlu Nakliyat firması hizmeti ve profesyonelliği ile örnek firmalardandır. Çakıroğlu nakliyat tayin dönemlerinin gelmesiyle şehirlerarası evden eve nakliyat hizmetini de sorunsuz ve ekonomik bir biçimde sunmaktadır.
ns xsk
TADAGRA 20 MG brings new variety of faith in the people who have compromised with their sex life due to ED. It is loaded with Tadalafil— a formula for hardening the penis
Latest 2019 olamide songs Download Latest 2019 wizkid songs The Latest 2019 davido songs Get Latest 2019 patoraking songs For Latest 2019 nigeria songs Download Latest 2019 naija videos The Latest 2019 davido Albums Free Latest 2019 musics Davido Download starboy album
get Latest 2019 songs
Vidalista 10 Mg is a first-rated generic Cialis replacement which inhibits the action of PDE5 enzymes— the catalysts which prevents the penis from getting erected. Loaded up with Tadalafil, the drug ensures early and lasting erection for the men
TADALISTA the need of big-budgeted Tadalafil-based Cialis as it possesses the congruent content and the similar effect on the erectile dysfunction (ED) in men
Vidalista 60Mg, Fildena 100, Cenforce 200 is a good generic medications for erectile dysfunction. This all medications is a FDA approved. So it’s very effective for erectile dysfunction treatment. All Generic Pill provide 50 % on following product, so you can save more money.
Vilitra
Kamagra
Sildalist
Vigora
Super P Force
Silagra
This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche
Hey there, You’ve done a fantastic job. I’ll certainly digg it and personally
recommend to my friends. I’m sure they’ll be benefited from this site.
klinik aborsi
1. biaya aborsi
2. biaya kuret
3. klinik aborsi bandung
4. klinik aborsi jakarta
5. klinik aborsi aman
6. klinik aborsi jakata barat
7. klinik aborsi raden saleh
8. klinik aborsi legal
klinik aborsi
a. klinik raden saleh
b. klinik aborsi legal
c. klinik aborsi murah
d. biaya aborsi
f. biaya kuret
g. cara menunda kehamilan
h. biaya aborsi 2020
klinik aborsi
1. klinik kuret kandungan
2. cara menggugurkan kandungan
3. biaya kuret
4. biaya aborsi
Very Informative Information. I have read full post thanks for share with us. Thanks so much. Regards: Maharaja Express
This is a very interesting post and all the details are in this post are awesome.
hotmail login
Prefabrik Fabrika
match highlights
https://sportingrave.com/category/videos/
You have done a magnificent job on this article. Your work is very good and I appreciate this issue. It’s a great pleasure reading your post. I’d really like to help appreciate it with the efforts you get with writing this post. You have some real writing talent. Today I found a great article over the internet ( Malwarebytes premium free key ) For lifetime.
Keep yourself busy. Work hard As you can do
https://crackkits.com/nuendo-crack/
https://crackkits.com/m3-data-recovery-crack-torrent/
https://ijicrack.com/tableau-desktop-crack/
İzmir avukatlık görevi ile birçok kişiye yardımcı olan Deniz Hukuk Bürosu hizmetlerine çeşitli dava mecralarında da devam etmektedir bunlardan bazıları; | hasta hakları davası | boşanma sebepleri ve sonuçları | avukat danışmanlığı | ağır ceza davaları vb. gibi alanlarda sizleri hukuk karşısında en iyi şekilde temsil sağlamaktayız izmir avukat
İzmir evnde Eve Nakliyat Nakliyat Hizmetleri müşteri memnuniyeti odaklı bir işletme olmaktadır… İzmir Evden Eve Nakliiyat yanısıra İzmir asansörlü nakliyat hizmeti de sunmaktadır…
Urla Koltukları yıkama ne kadar önemli olduğunun farkında olmasanız bile şimdi bunu size ispatlamayı hedefliyoruz. Her gün onlarca kişinin ziyaret ettiği normal bir evin veya işyerinin en kirli yüzeylerinden birinin kanepe ve koltuklar olduğunu görmüş olabilirsiniz. Uzun bir günün ardından işten eve geldiğimizde, önce kendimizi kanepeye atarız, oturup bir film izleriz ya da hastalandığımızda üzerine uzanırız. Ya da her gün işyerimizde aynı sandalyelere oturuyoruz, misafir olarak bir işyerine gittiğimizde o koltuklara oturuyoruz ve servis edileni tüketiyoruz. Bu aktiviteler gözümüze oldukça normal görünüyor, değil mi? Normal Urla koltuk yıkama ciddiyetini yavaş yavaş anlamaya başladığınızı tahmin ediyoruz.
Informative article , Great work
Leanpitch provides online training in Advanced Scrum Master during this lockdown period everyone can use it wisely.
Advanced Scrum Master Training Online
Yıllardan beri sorunsuz taşıma işlemi İzmir evden eve nakliyat olarak gerçekleştiriyoruz. Piyasanın en önemli nakliye şirketlerinden biri olduğumuz biliyor ve sizlere sonsuz güvence veriyoruz. Bu verdiğimiz güveni boşa çıkarmayacağımızın sözünü veriyoruz. Taşımaya karar verdiğiniz İzmir Evden Eve Nakliyat hizmeti ile eşyalarınızı düzenle paketliyor ve nakliye aracımıza yüklüyoruz. Olması gereken en kısa sürede gideceği yere sorunsuz bir şekilde teslim ediyoruz.
Piyasanın en uygun nakliye hizmetini sağlıyoruz. Elyar Nakliyat aynı zamanda İzmir Evden Eve Nakliyat firmamız Profesyonel ve güler yüzlü ekimizle hep yanınızda olduğumuzu tekrar hatırlatıyor ve sizlere huzurlu bir şekilde eşya taşımanın garantisini veriyoruz. Birçok avantajı sağlayan nakliye şirketimizden hizmet almak için hemen internet sitemizi ziyaret edin.
İzmir Evden Eve Nakliyat, eşyalarınızın durumuna göre küçük çaplı teçhizatla veya büyük çaplı teçhizatla yapılmaktadır. Araçlar kapalı ve dış etkilerden yalıtılmış bir şekilde hazırlanmıştır. Hava şartları ne olursa olsun eşyalarınız bu durumdan hiçbir şekilde etkilenmeyecektir. Taşınma esnasında kaçıncı katta oturduğunuz veya taşındığınız evin kaçıncı katta olduğunun da hiçbir önemi yoktur İzmir Evden Eve Nakliyat ekibi en iyi işi meydana getirmektedir. İzmir Asansörlü Nakliyat hizmeti sayesinde eşyalarınızın taşıma işlemi kolay bir şekilde gerçekleştirilmektedir.
Amazing Article, Really useful information to all So, I hope you will share more information to be check and share here.
flask in python
how to install flask in python
what is flask in python
flask in python tutorial
how to create a web page using flask in python
rest api using flask in python
how to install flask in python without pip
flask in python is used for
what is flask in python used for
learn flask in python
Amazing explanation about Slack and Salesforce Integration. Thanks for share with us. Thanks so much.
Luxury Train Tours
I always found very much interesting content on your posts. keep posting, thanks for sharing us and giving us your precious time.
Cobra Kai Jacket
IDM Crack Build 7 Retail + Activation Key Crack has a smart download judgment accelerator that includes smart dynamic document segmentation and multi-part secure download generation to speed up IDM key downloads.idm
The Latest Version Unity Pro Crack is the advanced level of production software that provides a platform to create multiplayer games, edited in real-time, and add 3D graphics to make it more fun.downloadunitypro
Avid Pro Tools 2020 Crack is an amazing production system app that allows users to record audio. It is a perfect tool for musicians, composers, audio enthusiasts, singers, and producers, helping them to edit, mix, write, and record music.avidprotools
SketchUp Pro Crack is a versatile 3D computer modeling architectural drawing suit that showcases excellence in interior and exterior design illustration.sketchuppro
VSDC Video Editor Full Crack Download is the most powerful and popular multimedia software to create and edit all kinds of videos.vsdcvideoeditor
Tally ERP 9 Crack is a smart and first-rate program. Users have chosen it for the business management of over one million people in more than 140 countries.tallyerp
FoneLab Aiseesoft 10.2.22 Crack is the most well-known data recovery programming for iOS contraptions.aiseesoftfonelab
AnyTrans 8.8.0 Crack is a proficient and hearty iOS Content Manager. Additionally, it furnishes you with both the opportunity and control of every one of your records and information, including photographs, music, messages, safari history, books, recordings, voice reminders, regardless of what the substance is on your iPhone or iCloud or even iTunes reinforcement.anytrans
XSplit Broadcaster 4.0.2007.2902 Crack is the application celebrated as probably the best stage for dealing with the media content.xsplitbroadcaster
Overwatch Crack is so standard that people are in control to stream it to Xbox One, PS4, and Windows. What makes this game awesome? Considering everything, we will find the right reaction.overwatch
Bitdefender Total Security Crack Innovation has been delivering award-winning information and security threats to individuals, businesses, and devices, networks, and cloud services.bitdefendertotalsecurity
Avid Media Composer Crack is a video and movie editing software. It enables online and offline video editing, including standard SD and high-definition HD, as well as finishing.avidmediacomposer
WESTWOOD Cello Untamed Free Download: CELLO UNTAMED is a solo cello library with the idea that the sample sounds like an entire performance.westwoodcellountamed
Guitar Pro Mac Crack Free Download: Wide range of new features and improvements. Create, play, and share cards!guitarpro
Wondershare Video Converter 12.0. Crack is the most trustable and acclaimed video changing over the mechanical get-together.wondersharevideoconverter
PowerDVD Crack reads more than DVD and Blu-ray discs. For video, audio, photos, VR 360° content, and even YouTube or Vimeo, PowerDVD Crack is your funny accomplice. powerdvd
Best blog by Leanpitch
To crack scrum master interview : Scrum Master Interview Questions
informative content , Great work
To crack scrum master interview : Scrum Master Interview Questions
Aurogra is an oral tablet that contains 100mg of the active ingredient sildenafil citrate. This tablet is used for the treatment of erectile dysfunction in men. Erectile dysfunction is a medical condition where men are unable to produce or maintain an erection.
martcastle
Thanks for sharing this informative content
Leanpitch provides online training in Enterprise agile coaching during this lockdown period everyone can use it wisely.
Enterprise Agile Coaching
This site is best…Thanks for sharing…
Spyhunter 5 Crack
Great work dear,,,,
Keyscape Crack
Thanks for sharing this article
Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.
CSM certification online
CSM online
CSM online certification
Scrum master certification online
CSM online training
Informative post. Great one.
Great Post, Very Informative! Do you want to know Why Designer or Developer Needs a VPN?
thanks fro sharing such a beautiful blog it helps me a lot.
https://onlinegpspro.com/
https://onlinegpspro.com/garmin-com-express.php
https://onlinegpspro.com/garmin-truck.php
https://onlinegpspro.com/garmin-zumo.php
https://onlinegpspro.com/garmin-basecamp.php
https://onlinegpspro.com/garmin-car.php
Thank you for valuable feedback, request you to join our email list so you can getting update via email.
https://trafficmoto.com/digital-marketing-company-in-lucknow/
. Thanks for sharing the interesting and informative post. https://trafficmoto.com/digital-marketing-company-in-agra
Visalista contains Tadalafil 20 mg as the active ingredient. Vidalista 20mg is a medicine that relaxes the smooth muscles of the walls of blood vessels, thus improving blood flow to certain parts of the body. This action makes the drug effective in treating men with erectile dysfunction. Your doctor may also prescribe Vidalista 20mg to you if you have signs and symptoms of BPH.
Visalista 40
Visalista 60
Visalista 20
Vilitra is an effective drug used to treat impotence and erectile dysfunction in men. Buy Super Vilitra Store properly in a cool, shady place at room temperature. The prevalence of ED increases with age. But that doesn’t mean it can’t affect young people. This disease affects men at all stages of their lives. With ED, men are unable to achieve or maintain the hard erection necessary to satisfy their sexual behavior.
Vilitra 60
Vilitra 20
Super Vilitra
Vigora is an approved medical use for the treatment of erectile dysfunction. If you want to buy Vigora 100mg tablets, it will be available in local drug stores and online stores.
Genericpharmamall is an online drug store that sells 100% safe to use generic drugs and we offer the best discount and rebate on the purchase of drugs.
Vigora 100
Tadalista tablets are primarily intended for the treatment of erectile dysfunction. This drug is known as a miracle in patients with erectile dysfunction. This drug allows men to relax blood vessels and thereby increase blood flow to the penis, improving and dilating erections. This drug works faster than other drugs used for erectile dysfunction and has a much longer-lasting effect. It lasts 18 hours with a similar efficacy and safety profile. The main ingredient in this drug is tadalafil.
Tadalista 60