• 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

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