-
Notifications
You must be signed in to change notification settings - Fork 21
Testing GLA endpoints with Postman
Notice you can use this guide (the 3 first filters) instead of steps 2and 4
1. Create a free account and Install Postman
This is necessary for auth purposes since postman is not using Wordpress at all. For getting both fields you should just enter into Google Listing and Ads dashboard for example, and then inspect some network call in order to get the fields.
You can right click with the mouse over the field and select "copy value"
Open Postman and create a new request. The url is like
http://localdomain.test/wp-json/wc/gla/route-to-test
For example if my domain is https://ab11-94-43-39-97.ngrok.io and the route is mc/review
I should write
https://ab11-94-43-39-97.ngrok.io/wp-json/wc/gla/mc/review
Go to headers tab and create the next fields:
Field name: cookie Field value: cookie value you copied in step 2
Field name: x-wp-nonce Field value: x-wp-nonce value you copied in step 2