Example of using the API Auth2

Thanks Patrick

And when you have a working sample Adriano - post it to the community :slight_smile:

5 Likes

Hello Teodor,
How can I setup the Oauth provider in server action ?
Please provide reference or any sample or steps to provide.

1 Like

I would like that very much

Trying to authorize with soundcloud… there is bug… the provider keeps appending “%2FdmxConnect%2Fapi%2FSoundcloud%2Fauthorize.php” to my redirect URI… :frowning:

here is the full link.

https://secure.soundcloud.com/connect?state=5951527e2dc7e9ec8cf3bc2359f1bef38f786d9a56696c92c0b862aaffcf772a&redirect_uri=https%3A%2F%2Fscbuddy.com%2FdmxConnect%2Fapi%2FSoundcloud%2Fauthorize.php&response_type=code&client_id=af1pjzSdeBE2r45cGlKHSrC0TI5r14H0S&scope=*

and it appends the state: I do not want this.

Any way to remove the escaped characters the %2fs …?

maybe you need to use some string functions, like preg replace (reg expression)?

It should look like this. below… not with those escaped characters gibberish.

https://secure.soundcloud.com/connect?response_type=code&client_id=af1ptjzSeBE2r45cGlKgdHSrC0TI5r14H0S&redirect_uri=https://scbuddy.com/callback. . the custom oauth2 api appears not ready.

Am not seeing this problem, can you screenshot what you have

I love it when people jump to blaming the software when there is an issue, despite the fact that 99% of the time it is a error on the part of the user. Please keep in mind that the custom oauth2 api works with Stripe, Square, Authorize.Net, and many many other API’s.

As @Hyperbytes mentioned, please post screenshots of your server connect and your custom API so we can try to help out.

1 Like

I am trying to produce this link with Wappler. right here so I can get the token and store it in a variable.

https://soundcloud.com/connect?response_type=code&client_id=af1pjzSeBE2r45cGlKHSrC0TI5r14H0S&redirect_uri=https://scbuddy.com/callback

no matter how I enter the credentials and ids into the oauth provider…

I get this link when I click “open in browser” in server actions.

https://secure.soundcloud.com/connect?state=5951527e2dc7e9ec8cf3bc2359f1bef38f786d9a56696c92c0b862aaffcf772a&redirect_uri=https%3A%2F%2Fscbuddy.com%2FdmxConnect%2Fapi%2FSoundcloud%2Fauthorize.php&response_type=code&client_id=af1pjzSdeBE2r45cGlKHSrC0TI5r14H0S&scope=*

maybe I am calling it wrong… do I need a api action to call get the page to load?

So there is a stripe tutorial somewhere? I will need that next. :frowning:

Just trying to Authorize with auth2 in soundclound… and get the token store it… to start using the api/

Yes, if you open in browser then that will be the result as your browser will URL encode the string but this does not mean that is how it is sent via the api

if I have a button on the page… how do I call the oauth2 Authorize when it is clicked?

Create a server connection, set it to “no load” (think that’s the term used, not actually at a computer).

Then in the click event of the button perform a serverconnection.load()