Integration REST API to send custom email in signup process - azure-ad-b2c-custom-policy

I am trying to integrate REST API to send custom email during signup process, in the custom policies, In the email I will send an OTP and then will verify it,
I was able to integrate REST API but not able to call the API during signup process only.
The api is getting called even during signIn process.
Any help?

So in step (6), Select a user flow type, you want to select the "Sign up" option only.
6.On the Create a user flow page, select the Sign up and sign in user flow.
See whether this helps or perhaps leads toward a path to the solution.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-sign-up-and-sign-in-policy?pivots=b2c-user-flow

Related

Sending a mail using 365 instance

I am developing an app on Microsoft Teams, and I would like to send a mail with an instance of a logged in user.
This means that a user logs into my Microsoft Teams app, wants to send a custom mail that the app generated, now I want to send a request to my REST API to send this mail as the user.
I could not find any relevant information regarding sending an email like this, I only found methods to send emails with supplying username/password or using the current logged user on the machine (which I can't use since I want to do that using my REST API).
Example of what I found but is irrelevant:
https://www.add-in-express.com/creating-addins-blog/2011/09/02/outlook-create-send-message/
You don't mention if your app is a Tab or a Bot app (or something else), but I'm presuming a Tab. In any case, both Bots and Tab's offer the ability to do SSO sign-in of the user, in which case you can easily get a token for the user. In your backend API, you can exchange this for an "on behalf of" (OBO) token, which lets you access the Microsoft Graph API on the user's behalf. Once that's done, you can call the "send mail" operation on Graph.
To find out more about the above, see:
here for an excellent video overview on SSO with Tabs
here for a blog post on how to exchange the tokens and make the graph call securely
here for the specific operation in Graph (sending email)

Auth0 : Multistep signup form for paid users

I am using auth0 in my existing regular php web application.
I have free as well as paid users in my site. For free users registration process is simple, I call the create user api which triggers the verification email.
But for paid users I have a multistep form. In first step users enters his information and registered as a free user in application then redirected to payment page. I can not call auth0 reg api after first step as user will get immediately verification email before payment.
If I call it after successful payment then its impossible to track if user bails out(Doesn't fill payment form, but already registered as a free user).
Please suggest what approach I should follow.
Thanks in advance
Make sure that you disabled public signups (this endpoint) and instead are performing the registration of users from your backend through the Management API create user endpoint.
Then you can use the verify_email parameter to indicate that a verification email should not immediately be send after user creation. You could then later use this endpoint to trigger a verification email to be sent after the payment form is completed.
If you have want to achieve best result i think you must follow below step to get rid of this problem:
1. Remove public signups in your application by trying this authenticating signup.
2.Perform the registration of individual user by this way create user's
3.Now you can simply use the verify_email parameter.
This parameter can be easily use post verification email process which prevent the issue of signup/signin before making payment.
Hope you got it & feel free for any help.

Load instagram images from user's feed via API

I am trying to display only the images the client uploaded to instagram on their website. The client's user ID# is 176722013. According to the API this URL will provide just such a feed:
https://api.instagram.com/v1/users/176722013/media/recent
As indicated by the error message, I need to provide either a client_id or an auth_token. Since I don't want to deal with authentication I went ahead and created an "app" in instagram developers to get a client_id # 5b5a6e95469f465f9f70e4ebcf9ee3a6
Yet when I add it to the URL I still get an error that I needed to provide an auth_token. How does that make sense?
https://api.instagram.com/v1/users/176722013/media/recent?client_id=5b5a6e95469f465f9f70e4ebcf9ee3a6
The app is in sandbox mode. When I attempt to submit it for review I must provide the purpose for the app. Upon selecting " I want to display my Instagram posts on my website." as the purpose I get the following message:
You do not need to submit for review for this use case. If you are a
developer and you want to display Instagram content on your website,
then you do not need to submit your app for review. By using a client
in sandbox mode, you can still access the last 20 media of any sandbox
user that grants you permission.
I am truly at a loss for how to proceed. Thanks for any support
As of June 1st, 2016, you need access_token to access API, where did u read: either a client_id or an auth_token ?
authenticate and get access_token and use to get API response.
#snucky you don't need authentication but you do need the users permission - from what I gather, instagram is accessible only by registered users - so you still need the access token - but instead of a server-explicit you need client-implicit.
Make a http request from your client to the api/authorize with the ?client_id=ID AND A redirect_uri=http://yoursite.com/ when the user allows the application, you'll receive an access_token in the url, which you will then use in every subsquent instagram call
read more here

How to send invitation to facebook friend from my application

Hi I am working on Rails application. My application is currently in 'invitation only' mode. What I want to do is once user signed up to my application then user should be able to invite his Facebook friends to my application. So what is the best way to do it? I want to do similar like pinterest does. pinterest is also in invitation only mode. But still it allows my facebook friend to whom I have sent an invite to sign up directly. So how I can implement it in my application? Any guidance will be helpful..
Use the requests dialog:
http://developers.facebook.com/docs/reference/dialogs/requests/
Store the list of user id's you get back (which you need to do anyhow
to delete the request programmatically when the come to your app)
When a user tries to login to your app, ensure that they're on your
list of id's you stored earlier.
Delete their app request
See http://developers.facebook.com/docs/reference/dialogs
Deleting Requests When a user is directed to your application, by
clicking a Request from the application, the games dashboard, or from
a Request notification, you must delete the request after it has been
accepted. Requests are not automatically deleted once they have been
clicked, thus it is the developer’s responsibility to clear them once
they have been consumed.

Accessing linkedin api without repetitive sign in?

I am new to linkedin api. I have a doubt regarding the api.
I am integrating the api in my application, so different user have to register in the linkedin to get the data using that api? Can it be pre registered and the user can get the data whatever he wants.
Suppose user wants to search about company. He will type the company name and will get the names of the company related to search. He should not log in in linked in before searching.
Is it possible?
If you are using the JavaScript API, then yes, you may need to have the user log in each time as the JavaScript API's authorization is cleared every time the user closes their browser.
If you are using the REST API, you can store the user's OAuth token and use that to make the calls on behalf of the user, saving them having to sign-in each time.