• 0
Sign in to follow this  
Weslley17w

Error usuario de teste

Question

Erro ao cria usuario de test me retorna 

 

{"message":"Unauthorized scopes","error":"unauthorized_scopes","status":401,"cause":[]}

 

meu php ta assim

<?php

$access_token = "Meu Token Aqui";
$data = json_encode(array('site_id' => 'MLB')); /* Já usei apenas array('site_id' => 'MLB')*/

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_URL,"https://api.mercadolibre.com/users/test_user?access_token=$access_token");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);

$response = curl_exec($ch);

   
echo $response;

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Wesley, brigado resovel meu probleba eu gerava token com aplicação do próprio mercado livre brigado.

só mas uma duvida posso criar anuncios com user de test né e cria outro para comprar né ?

mas no casso eu pago com meu dinheiro ou posso usa Pagamento de teste que tem na documentação do Mercado Pago ?

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