• 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...