• 0
Sign in to follow this  
Jairo Romero

Autenticacion y Autorizacion

Question

Estoy siguiendo la guia de SDK Ruby de mercadolibre.

require "rubygems"
require 'lib/meli'
require 'sinatra'
require 'json'

set :meli, Meli.new(CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN, REFRESH_TOKEN)
disable :reload

get '/authorize' do
    content_type :text
    settings.meli.authorize(params["code"], "https://8f438cfc.ngrok.io") if params["code"]
    #Don't Forget to Save this data!
    "SUCESS! Token: #{settings.meli.access_token} RefresToken: #{settings.meli.refresh_token}"
end

get '/login' do
    "<a href='#{settings.meli.auth_url("https://8f438cfc.ngrok.io/authorize")}'>Login</a>"
end

En donde dice CALLBACK_AUTHORIZE tengo esta direccion https://8f438cfc.ngrok.io/authorize, me sale la opcion de autorizar mi aplicacion, me redirecciona a esta url https://8f438cfc.ngrok.io/ml?code=TGxxxxxxxxxxxxxxxxxxxxx donde puedo ver el codigo en la url que te da para obtener el access token y el refresh token, pero en la pantalla del navegador me sale este erro que muestro en la imagen.

Me podrian orientar que estoy haciendo mal.

error.jpg

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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
Sign in to follow this