Can we call Google AdExchange Seller API using CURL? - google-dfp

How do we call ad exchange seller api using curl.
We needs to create a script which will pull data dynamically and insert it to database. Please help me I have tried below php script and working but to run script we need to click connect link.
Regards,
Mukesh

Related

Use ServiceNow forms for outbound post calls

I am trying to use the servicenow form field to populate the values of an external application with a create api call.
My attempt was to create a servicenow application with studio. In studio, I clicked "Create Application File" > "OutBound Integrations" > "Rest Message", and I was able to add the api endpoint, and I ran the test to make a post call to the api. And when I went to the api application, the value was there; so that's great! Now I'm trying to add a form to the servicenow application, so that the values added to the fields will not only show in servicenow, but also to the api. Is this possible, and how do I go about doing this?
The Solution to this was Business rule. In ServiceNow Studio, I created a new application and added Business Rule. In there, I was able to add a server-side script to make it work.
Here's a documentation from ServiceNow to make it work:
https://developer.servicenow.com/app.do#!/training/article/app_store_learnv2_rest_london_outbound_rest_integrations/app_store_learnv2_rest_london_exercise_write_a_script_to_invoke_the_rest_message?v=london

HTTP 401 Unauthorized when export report by using PowerBi rest api

I got 401 unauthorized when trying to export a report from Power BI online by using the Power BI REST API.
My access token works fine with other API methods. I am also setting full API access in App registrations.
When I logged in by using the same account and use 'try', the access token provided in this test actually works.
https://learn.microsoft.com/en-us/rest/api/power-bi/reports/exportreport
Has anyone successfully used this method?
You will need to create an Authentication app and provide the right privileges corresponding to the REST API you are loading from. For this particular API Microsoft suggests to provide Report.Read.All or Report.ReadWrite.All privileges.
You can achieve this directly by creating an authentication application from https://dev.powerbi.com/apps.
You will also need to make sure you grant the admin consent once your app is up and running.
Also, make sure the request you are creating is in the right format. If you match your request with the one specified here : https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export report and test to check if it working with your parameters and login, you should be able to make it work with your code. Also test it with Postman to make sure you are entering the right configuration in the request and you know what you are requesting.
Once you have all this in place, you should not have any issues accessing the right data.

Shopify import csv products

I would like to know if there is a default feature for importing products export files in json/xml/csv format and if this can be called daily with a cron or something automatically.
Thanks,
Tibi
You are free to create a private App that has scope permissions to write_products, write_inventory and read_locations. With that, you can establish a script that can parse your json/xml/csv and update inventory. That script can be scheduled to run as often as you need. Shopify is an ideal platform for the use of scripting to accomplish many manual tasks.
I agree with David. You need to create a custom App in your store and submit your data to a script(you can use PHP) triggered by CRON hosted on a server which will create a record using Product API.
Step 1: Go to Apps tab in admin section of your store. Scroll down and click on Manage private apps, create an App here to generate API keys and password.
Step 2: Create and host(on a secured server) a script that will use API keys generated in previous step to create new product record using https://help.shopify.com/en/api/reference/products/product#create
Step 3: Fetch your data in any format and send this data in JSON format to your Shopify store using API. A new product record will be created in your store.
Note: You can test this API by using credential created in Step 1 on Postmen tool you can refer https://help.shopify.com/en/api/reference/products/product#create. You will have to hit Example URL generated in Private app from Step 1.

SendGrid -- How to delete a single Marketing Campaign recipient with API and PHP

Will someone help me with the PHP code to authenticate my Sendgrid account connection and then delete a Marketing Campaign recipient via API?
From the help documentation, this appears to be the command line -- DELETE https://api.sendgrid.com/v3/contactdb/lists/{list_id}/recipients/{recipient_id} HTTP/1.1 -- but I can't figure out what to do with it, since it isn't regular PHP code. The only sample code I found pertained to Legacy Newletters (which I got to work) and not contacts used by Marketing Campaigns.
What are you using to interact with the API? cURL? You just need to make an HTTP DELETE request to the url https://api.sendgrid.com/v3/contactdb/lists/{list_id}/recipients/{recipient_id}, replacing {list_id} and {recipient_id} with the IDs of the list and the recipient.
Here's an example of a function that will make a delete request for you with cURL: https://stackoverflow.com/a/17935536/401096

PayPal statement via API

I have just reviewed REST API and Classic API references and there doesn't seem to be a method which would allow to obtain transactions statement? Essentially I am looking for what can be found in PayPal admin panel under History -> Download History -> Balance Affecting Payment.
Any suggestions how to obtain PayPal statement via API very much appreciated.
There isn't an API for this. However, a couple of options would be to use IPN and have all of the data written to your own database, and then you can query your own database for the information. Another option would be to sign up for SFTP reporting on your account. Then you can connect via SFTP and retrieve reports.