Category : rest

i would like to send email messages with our corporate emails provided by Gmail. In order to do that, i would like to use Gmail API with rest commands (basically launched with a php procedural code, for legacy purpose). i have that code : // i go to this url : // https://accounts.google.com/o/oauth2/auth?client_id=my_client_id&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=https://www.googleapis.com/auth/gmail.send&response_type=code // and ..

Read more

I am trying to create a REST API application using the Yii2 Advanced framework. But at startup I have an error: {"name":"Not Found","message":"Page not found.","code":0,"status":404,"type":"yiiwebNotFoundHttpException","previous":{"name":"Invalid Route","message":"Unable to resolve the request "site/index".","code":0,"type":"yiibaseInvalidRouteException"}} Add site/index route in SiteController.php for testing: namespace apicontrollers; use yiirestController; class SiteController extends Controller { public function actionIndex() { return ‘api’; } } ..

Read more

So this is my Google Play Store application https://play.google.com/store/apps/details?id=com.rosterelf.android.phone&hl=en (However I am not an owner of this App and I do not have developer account or service account for this App. I am just a developer). And I want to get all the reviews https://play.google.com/store/apps/details?id=com.rosterelf.android.phone&hl=en&showAllReviews=true using PHP library or cURL (if that’s) possible. I went ..

Read more

I am fairly new to WordPress/WooCommerce and I’m struggling to get a custom rest api endpoint registered. The following gives me a 404 when I try the endpoint : class WC_FastSpring_Fulfillment_Integration extends WC_Integration { public function __construct() { $this->id = ‘av-wc-fastspring’; $this->method_title = ”; $this->method_description = ”; // Method with all the options fields $this->init_form_fields(); ..

Read more

My problem is actually to upload file with vich. It work perfect with an other entity. But in my user’s entity it doesnt work. Vich uploader configuration : vich_uploader: db_driver: orm mappings: user_cover: uri_prefix: /media/users upload_destination: ‘%kernel.project_dir%/public/media/users’ namer: VichUploaderBundleNamingOrignameNamer delete_on_update: true delete_on_remove: true play_media: uri_prefix: /media/defis upload_destination: ‘%kernel.project_dir%/public/media/defis’ namer: VichUploaderBundleNamingOrignameNamer delete_on_update: true delete_on_remove: true The ..

Read more

We have the code below: $curlbat = curl_init(); $url = ‘https://’.$hostsp.$rest_apispins; $method = ‘GET’; $body = ”; $headers = $signer->getHeaders($url, $method, $body, ‘application/json’); $curlbatOptions = [ CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => ”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 50, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => $method, CURLOPT_HTTPHEADER => $headers, CURLOPT_HEADER => ..

Read more