0
votes

When we are calling Uber Products API, its working perfect but when we call Ride Reminder API, we getting following 404 errors:

PHP Fatal error: Uncaught exception GuzzleHttp\Exception\ClientException

with message

Client error: POST https://sandbox-api.uber.com/v1.2/reminders

resulted in a 404 Not Found response:

404 page not found in /var/www/html/uber/uber/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/html/uber/uber/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /var/www/html/uber/uber/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /var/www/html/uber/uber/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /var/www/html/uber/uber/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}() #4 /var/www/html/uber/uber/vendor/guzzlehttp/promises/src/Promise.php(246): Guzzle in /var/www/html/uber/uber/vendor/stevenmaguire/uber-php/src/Client.php on line 173

We are using following sample code to work out, let me know what could be issue.

<?php
include "vendor/autoload.php";

$client = new Stevenmaguire\Uber\Client(array(
    'access_token' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
    'server_token' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
    'use_sandbox'  => true, // optional, default false
    'version'      => 'v1.2', // optional, default 'v1.2'
    'locale'       => 'en_US', // optional, default 'en_US'
));

$products = $client->getProducts(array(
    'latitude' => '41.85582993',
    'longitude' => '-87.62730337'
));
var_dump($products);

$attributes = array(
    'reminder_time' => '1429294463',
    'phone_number' => '555-555-5555',
    'event' => array(
        'time' => '1515750429',
        'name' => 'John with friends',
        'location' => 'Dolores Park',
        'latitude' => '37.759773',
        'longitude' => '-122.427063',
        'product_id' => "737d4e43-9e12-4a81-add3-acb101bab4c7",
    ),
);
$reminder = $client->createReminder($attributes);
var_dump($reminder);

Please help us to fix this.

1
Are you sure reminders are possible on the 'sandbox' enviorment, just looked up the docs and tried developers.uber.com/v1/reminders and got a 403 forbidden (on sandbox got a 404 not found)Matt Smeets
@Matt Smeets : I tried in sandbox and prod both endpoint both are returning 404 errorsk2
The ride reminders endpoint requires privileged access (so you need to request access through the developer dashboard). The Ride Reminders API has been deprecated so we are not approving new requests for access at this time.Dustin Whittle

1 Answers

2
votes

Documentation is removed for ride reminders from http://developer.uber.com and they are not currently supported.