Hello, I am a developer and I would like the user to make a Dwolla transaction on my website.
I notice that (1).I need to the user to authenticate (OAuth2 protocol) through the Dwolla API first to obtain an authentication code.
(2) I would then use the authentication code to retrieve the access token.
(3) And then the user would be on their way to making a transaction.
The problem is, the Dwolla API isn’t integrated into the Bubble environment yet, unlike Facebook or LinkedIn for example, so I’m having trouble doing the setup in the API connector for (1).
I cannot even properly test this through the “preview” mode, because a redirect_url is required to go through the whole authentication process. This is what I have so far
Hello @istephenyu, how are you? OAuth 2 authentication may seem complicated, but it’s quite simple once you understand how to do it.
First, you need to authorize your application within Dwolla. With your credentials in hand, create an authentication button in your application; in the workflow, create an action when this button is clicked. “Open an external website” cole a url de pedido de autorização " https: // provider. com/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_CALLBACK_URL&scope=REQUESTED_SCOPES&state=OPTIONAL_STATE "
response_type=code indicates that your application wants an authorization code.* client_id is the ID of your application registered with the OAuth service.* redirect_uri is the URL to which the user will be redirected after authorization.* scope defines the levels of access that your application is requesting.* state is a value that can be used to mitigate certain types of attacks, such as CSRF.User Consents: The user sees a page from the OAuth provider where they can accept or decline the access requested by your application. If accepted, the OAuth provider redirects the user back to the redirect_uri provided with an authorization code included in the URL.Example of Return Redirection:: “https://yourapp.com/callback?code=AUTHORIZATION_CODE&state=OPTIONAL_STATE”
Extract the Authorization Code: Your application, upon receiving the redirect to the redirect_uri, must extract the authorization code from the URL. Once you have the authorization code, you can exchange this code for an access token using the access token action. “Do when Get code from page URL is not empty”
Once you have the authorization code, you can exchange this code for an access token. Remember that this process can vary a bit depending on the service you’re using.