Skip to main content
Box Employee
May 22, 2025 12:26 PM UTC
Question

API - https://developer.box.com/reference/get-authorize/

<?php

 

$curl = curl_init();

 

curl_setopt_array($curl, array(
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Cookie: box_visitor_id=61cfe60a7759c5.60150558; site_preference=desktop; bv=OPS-44937; cn=13; z=2sap7aro42igi8or5fvn36b1qi'
  ),
));

 

$response = curl_exec($curl);

 

curl_close($curl);
echo $response;

?>

Above is my code to get access token against my client's account.
I am passing all necessary parameters but still getting error as
Error: redirect_uri_missing

Please share what needs to be done here.

 

    1 reply

    Box Employee
    May 22, 2025 12:26 PM UTC

    Hi, 

    Have you set up a redirect uri in the developer console? It needs to match what you pass in: https://coressss.vocalforlocal.biz/test_amruta.php

    BOX1_qa1ZVhcdKSM4YhkGtKlf2Q.png

    Thanks, 

    Alex, Box Developer Advocate

    Translate