• 0
Fábio Branis

Questions about Authentication URL - Server Side

Question

Good Morning folks!

 

I'm trying to build an app to integrate with an ERP (TOTVS - Protheus).

 

I'm using an PHP webservice (REST) to do the authentication stpe, because the ERP's SDK can´t do that.

So, I'm using the PHP SDK.

 

I've read the documentation and can't find a solution to my problem.

 

I'm trying to follow the Server Side flow, but I can't go further the step one.

 

What I'm doing:

 

Step 1: Obtain a code

 

My PHP class receives the parameter to do this. I'm sending the User ID and the secret code.

 

So I'm using the getAuthUrl() method to build the URL and Get method to request the Auth code.

 

So, Mercado Livre returns the http status: 302 (Moved Temporarily).

 

My location is Brazil, so the url is http://auth.mercadolivre.com.br/authorization.

My app builds the parameters perfectly, just like the docs says.

 

It's my first time working in a project with oAuth, so I'm lost with this issue.

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I saw that I've don't read the documentation correctly hehehehe

 

There's a part that describes the following:

If the user grants your application the requested data permission the OAuth Dialog will redirect the user’s browser to the URL you specified in the redirect_url together with an authorization code. This redirect uses the HTTP 302 status code. 

 

I don't know what to do to automate that.

Share this post


Link to post
Share on other sites
  • 0

a autenticação server side só é possível depois do cliente ter autorizado a aplicação, a documentação explica passo-a-passo como realizar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now