This is an article to document how I got a client's eBay to notify the seller every time a buyer bought a fixed price item. This uses the Trading API even though I'm aiming for the Platform Notifications API...
Why?
A follow on from my article Zoho Creator: Push to eBay Listings. I have a Creator app that needs to receive the orders from an eBay account as soon as the order or transaction is made on a Fixed Price item.
How?
So first of all, you'll need an access token: please visit my article and read the first part on how to get a valid Access Token for the rest of these steps. Once we have an access token, we will check what notifications already exist (if any), and then we will create a function that subscribes the application so that any order is sent to a URL, specifically a CRM REST API function that will forward the payload data to Zoho Creator (Yes you will need CRM version Enterprise or Zoho One [that supports functions] for this process).
So first off, here's a reminder on the function that generates an access token from a refresh token:
string API.fn_eBayConnect_AccessToken() { b_SandboxMode = false; v_Output = ""; if(b_SandboxMode) { r_Api = API_Integration[Connection_Name == "eBay API (Sandbox)"]; //info "Sandbox Mode"; } else { r_Api = API_Integration[Connection_Name == "eBay API (Production)"]; //info "Production Mode"; } if(r_Api.count() > 0) { //info "Access Token Expires at: " + r_Api.Access_Token_Expiry; v_Output = r_Api.Access_Token; // // zoho.currentttime can be server time as this function will check expiry against the server time anyway if(zoho.currenttime >= r_Api.Access_Token_Expiry) { v_Base64Auth = zoho.encryption.base64encode(r_Api.Client_ID + ":" + r_Api.Client_Secret); v_TokenEndpoint = r_Api.Token_Endpoint; m_Headers = Map(); m_Headers.put("Content-Type","application/x-www-form-urlencoded"); m_Headers.put("Authorization","Basic " + v_Base64Auth); m_Params = Map(); m_Params.put("grant_type","refresh_token"); m_Params.put("refresh_token",r_Api.Refresh_Token); m_Params.put("scope",r_Api.Scope_s); r_eBayResponse = invokeurl [ url :v_TokenEndpoint type :POST parameters:m_Params headers:m_Headers ]; //info r_eBayResponse; if(!isnull(r_eBayResponse.get("access_token"))) { // info "New Token Generated"; r_Api.Access_Token=r_eBayResponse.get("access_token"); v_AccessSeconds = r_eBayResponse.get("expires_in").toLong(); r_Api.Access_Token_Expiry=zoho.currenttime.addSeconds(v_AccessSeconds); v_Output = r_Api.Access_Token; } } else { //info "Re-using Token"; } } return v_Output; }
- string API.fn_eBayConnect_AccessToken()
- {
- b_SandboxMode = false;
- v_Output = "";
- if(b_SandboxMode)
- {
- r_Api = API_Integration[Connection_Name == "eBay API (Sandbox)"];
- //info "Sandbox Mode";
- }
- else
- {
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- //info "Production Mode";
- }
- if(r_Api.count() > 0)
- {
- //info "Access Token Expires at: " + r_Api.Access_Token_Expiry;
- v_Output = r_Api.Access_Token;
- //
- // zoho.currentttime can be server time as this function will check expiry against the server time anyway
- if(zoho.currenttime >= r_Api.Access_Token_Expiry)
- {
- v_Base64Auth = zoho.encryption.base64encode(r_Api.Client_ID + ":" + r_Api.Client_Secret);
- v_TokenEndpoint = r_Api.Token_Endpoint;
- m_Headers = Map();
- m_Headers.put("Content-Type","application/x-www-form-urlencoded");
- m_Headers.put("Authorization","Basic " + v_Base64Auth);
- m_Params = Map();
- m_Params.put("grant_type","refresh_token");
- m_Params.put("refresh_token",r_Api.Refresh_Token);
- m_Params.put("scope",r_Api.Scope_s);
- r_eBayResponse = invokeUrl
- [
- url :v_TokenEndpoint
- type :POST
- parameters:m_Params
- headers:m_Headers
- ];
- //info r_eBayResponse;
- if(!isnull(r_eBayResponse.get("access_token")))
- {
- // info "New Token Generated";
- r_Api.Access_Token=r_eBayResponse.get("access_token");
- v_AccessSeconds = r_eBayResponse.get("expires_in").toLong();
- r_Api.Access_Token_Expiry=zoho.currenttime.addSeconds(v_AccessSeconds);
- v_Output = r_Api.Access_Token;
- }
- }
- else
- {
- //info "Re-using Token";
- }
- }
- return v_Output;
- }
Get Notification Preferences [Optional]
Here's a function to run just to see what the current notification preferences are setup. This one didn't tell me much first time I ran it but I can use it later on to check if my "setting the notifications" process worked.
void API.fn_eBayQuery_GetNotificationPreferences() { /* Function: fn_eBayQuery_GetNotificationPreferences() Purpose: Retrieves the requesting application's notification preferences Date Created: 2021-09-20 (Joellipman.com - Joel Lipman) - Initial release More Info: - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading - GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html */ r_Api = API_Integration[Connection_Name == "eBay API (Production)"]; if(r_Api.count() > 0) { v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken(); v_TradingAPIVersion = r_Api.API_Version; v_Endpoint = "https://api.ebay.com/ws/api.dll"; v_APICallName = "GetNotificationPreferences"; // // build header m_Headers = Map(); // siteID 3=UK, 0=US, check API Explorer Test Tool for others m_Headers.put("X-EBAY-API-SITEID",3); m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",v_TradingAPIVersion); m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName); m_Headers.put("X-EBAY-API-IAF-TOKEN",v_AccessToken); // // build params m_Params = Map(); // set to application or user to see the notifications for each m_Params.put("PreferenceLevel","User"); m_Params.put("WarningLevel","High"); m_Params.put("ErrorLanguage","en_GB"); // // convert to xml and replace root nodes x_Params = m_Params.toXML(); x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">"); x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>"); // // send the request XML as a string r_ResponseXML = invokeurl [ url :v_Endpoint type :POST parameters:x_Params headers:m_Headers ]; info r_ResponseXML; } }
- void API.fn_eBayQuery_GetNotificationPreferences()
- {
- /*
- Function: fn_eBayQuery_GetNotificationPreferences()
- Purpose: Retrieves the requesting application's notification preferences
- Date Created: 2021-09-20 (Joellipman.com - Joel Lipman)
- - Initial release
- More Info:
- - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- - GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html
- */
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- if(r_Api.count() > 0)
- {
- v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken();
- v_TradingAPIVersion = r_Api.API_Version;
- v_Endpoint = "https://api.ebay.com/ws/api.dll";
- v_APICallName = "GetNotificationPreferences";
- //
- // build header
- m_Headers = Map();
- // siteID 3=UK, 0=US, check API Explorer Test Tool for others
- m_Headers.put("X-EBAY-API-SITEID",3);
- m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",v_TradingAPIVersion);
- m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName);
- m_Headers.put("X-EBAY-API-IAF-TOKEN",v_AccessToken);
- //
- // build params
- m_Params = Map();
- // set to application or user to see the notifications for each
- m_Params.put("PreferenceLevel","User");
- m_Params.put("WarningLevel","High");
- m_Params.put("ErrorLanguage","en_GB");
- //
- // convert to xml and replace root nodes
- x_Params = m_Params.toXML();
- x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
- x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>");
- //
- // send the request XML as a string
- r_ResponseXML = invokeUrl
- [
- url :v_Endpoint
- type :POST
- parameters:x_Params
- headers:m_Headers
- ];
- info r_ResponseXML;
- }
- }
Setup Creator form to receive data
- Login to your Zoho Creator and setup a form, I've called mine "eBay Webhook Payloads"
- Add a Single-Line field called "Event Type"
- Add a Multi-line field called "Payload"
- Click Done
- Make a note of the name of this form (the form link name, eg. "eBay_Webhook_Payloads")
Setup a CRM function to receive data
- Login to your ZohoCRM > Setup > Developer Space > Functions
- Click on "New Function"
- Give it a function name, I'm calling mine "fn_eBay_Webhook_OrderNotification"
- Give it a display name, I'll give it "eBay - Webhook - Order Notification"
- Set the Category to "Standalone"
- Set the parameters to crmAPIRequest (string)
- Give it the following code, though you will need to replace the AppOwner, AppName, FormName and connection name (which has scopes "ZohoCreator.form.CREATE" and "ZohoCreator.report.CREATE")copyraw
v_AppOwner = "myCreatorAppOwner"; v_AppName = "myCreatorAppName"; v_FormName = "eBay_Webhook_Payloads"; v_ReportName = "eBay_Webhook_Payloads_Report"; m_Payload = crmAPIRequest; v_Type = "Unknown"; l_SoapActions = List(); if(!isnull(m_Payload.getJSON("headers"))) { l_SoapActions = m_Payload.getJSON("headers").getJSON("soapaction"); for each v_SoapAction in l_SoapActions { l_SoapActionParts = v_SoapAction.toList("/"); v_Type = l_SoapActionParts.get(l_SoapActionParts.size() - 1); } } m_Blank = Map(); m_CreateRecord = Map(); m_CreateRecord.put("Event_Type",v_Type); m_CreateRecord.put("Payload",m_Payload.toString()); r_CreateRecord = zoho.creator.createRecord(v_AppOwner,v_AppName,v_FormName,m_CreateRecord,m_Blank,"joels_connector"); /* // Email yourself as a test but remember to remove this before going Live. sendmail [ from :zoho.adminuserid to :"This email address is being protected from spambots. You need JavaScript enabled to view it." subject :"TEST ebay Webhook Notification" message :m_Payload ] */ return r_CreateRecord;
- v_AppOwner = "myCreatorAppOwner";
- v_AppName = "myCreatorAppName";
- v_FormName = "eBay_Webhook_Payloads";
- v_ReportName = "eBay_Webhook_Payloads_Report";
- m_Payload = crmAPIRequest;
- v_Type = "Unknown";
- l_SoapActions = List();
- if(!isnull(m_Payload.getJSON("headers")))
- {
- l_SoapActions = m_Payload.getJSON("headers").getJSON("soapaction");
- for each v_SoapAction in l_SoapActions
- {
- l_SoapActionParts = v_SoapAction.toList("/");
- v_Type = l_SoapActionParts.get(l_SoapActionParts.size() - 1);
- }
- }
- m_Blank = Map();
- m_CreateRecord = Map();
- m_CreateRecord.put("Event_Type",v_Type);
- m_CreateRecord.put("Payload",m_Payload.toString());
- r_CreateRecord = zoho.creator.createRecord(v_AppOwner,v_AppName,v_FormName,m_CreateRecord,m_Blank,"joels_connector");
- /*
- // Email yourself as a test but remember to remove this before going Live.
- sendmail
- [
- from :zoho.adminuserid
- to :"This email address is being protected from spambots. You need JavaScript enabled to view it."
- subject :"TEST ebay Webhook Notification"
- message :m_Payload
- ]
- */
- return r_CreateRecord;
- Save the function
- While still on the CRM functions page, hover your mouse over the function name you just created and click on the ellipsis/three dots icon
- Select REST API and enable the API Key, this will return a URL that you want to copy to clipboard or notepad for later use.
Set Notification Preferences
Finally, here's the function that subscribed my application so that every time an order/transaction was made on eBay for a fixed price item, it sent a payload (like a webhook) to my CRM REST API function. The following includes UserDeliveryPreferenceArray but I've successfully subscribed without this. I'm just including it because I want to be notified if feedback is left:
OAuth Method (requires contacting eBay to enable this once run)
void API.fn_eBayQuery_SetNotificationPreferences()
{
/*
Function: fn_eBayQuery_SetNotificationPreferences()
Purpose: Manage notification and alert preferences for a user or an application
Date Created: 2021-09-20 (Joellipman.com - Joel Lipman)
- Initial release
More Info:
- API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html
- SetNotificationPreferences Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/SetNotificationPreferences.html
- Event Types Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/extra/stntfctnprfrncs.rqst.evntprprty.evnttyp.html
*/
r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
if(r_Api.count() > 0)
{
v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken();
//info v_AccessToken;
v_TradingAPIVersion = r_Api.API_Version;
v_Endpoint = "https://api.ebay.com/ws/api.dll";
v_APICallName = "SetNotificationPreferences";
//
// specify the URL of the CRM REST API Function here (can be a mailto:email@address)
v_CrmRestFunction = "https://www.zohoapis.com/crm/v2/functions/fn_ebay_webhook_ordernotification/actions/execute?auth_type=apikey&zapikey=1003.aaaabbbbccccddddeeeeffff11112222.33334444555566667777888899990000";
//
// build header
m_Headers = Map();
m_Headers.put("X-EBAY-API-SITEID",3);
m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",v_TradingAPIVersion);
m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName);
m_Headers.put("X-EBAY-API-IAF-TOKEN",v_AccessToken);
//
// build params
m_Params = Map();
m_Params.put("WarningLevel","High");
m_Params.put("ErrorLanguage","en_GB");
m_AppDeliveryPrefs = Map();
m_AppDeliveryPrefs.put("AlertEmail","mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.");
m_AppDeliveryPrefs.put("AlertEnable","Enable");
m_AppDeliveryPrefs.put("ApplicationEnable","Enable");
m_AppDeliveryPrefs.put("ApplicationURL",v_CrmRestFunction);
m_AppDeliveryPrefs.put("DeviceType","Platform");
m_DeliveryURL = Map();
m_DeliveryURL.put("DeliveryURL",v_CrmRestFunction);
m_DeliveryURL.put("DeliveryURLName","eBayToZoho");
m_AppDeliveryPrefs.put("DeliveryURLDetails",m_DeliveryURL);
m_Params.put("ApplicationDeliveryPreferences",m_AppDeliveryPrefs);
/* only used for wireless applications?
m_EventProperty=Map();
m_EventProperty.put("EventType","FixedPriceTransaction");
m_Params.put("EventProperty",m_EventProperty);
*/
// include the User Delivery Preference Array
l_UserDeliveryPreferenceArray = List();
m_EventPair = Map();
m_EventPair.put("EventType","FixedPriceTransaction");
m_EventPair.put("EventEnable","Enable");
l_UserDeliveryPreferenceArray.add(m_EventPair);
m_EventPair = Map();
m_EventPair.put("EventType","Feedback");
m_EventPair.put("EventEnable","Enable");
l_UserDeliveryPreferenceArray.add(m_EventPair);
m_NotificationEnable = Map();
m_NotificationEnable.put("NotificationEnable",l_UserDeliveryPreferenceArray);
m_Params.put("UserDeliveryPreferenceArray",m_NotificationEnable);
//
// convert to xml and replace root nodes
x_Params = m_Params.toXML();
x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>");
//info x_Params;
//
// send the request XML as a string
r_ResponseXML = invokeurl
[
url :v_Endpoint
type :POST
parameters:x_Params
headers:m_Headers
];
info r_ResponseXML;
}
}
- void API.fn_eBayQuery_SetNotificationPreferences()
- {
- /*
- Function: fn_eBayQuery_SetNotificationPreferences()
- Purpose: Manage notification and alert preferences for a user or an application
- Date Created: 2021-09-20 (Joellipman.com - Joel Lipman)
- - Initial release
- More Info:
- - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- - GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html
- - SetNotificationPreferences Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/SetNotificationPreferences.html
- - Event Types Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/extra/stntfctnprfrncs.rqst.evntprprty.evnttyp.html
- */
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- if(r_Api.count() > 0)
- {
- v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken();
- //info v_AccessToken;
- v_TradingAPIVersion = r_Api.API_Version;
- v_Endpoint = "https://api.ebay.com/ws/api.dll";
- v_APICallName = "SetNotificationPreferences";
- //
- // specify the URL of the CRM REST API Function here (can be a mailto:email@address)
- v_CrmRestFunction = "https://www.zohoapis.com/crm/v2/functions/fn_ebay_webhook_ordernotification/actions/execute?auth_type=apikey&zapikey=1003.aaaabbbbccccddddeeeeffff11112222.33334444555566667777888899990000";
- //
- // build header
- m_Headers = Map();
- m_Headers.put("X-EBAY-API-SITEID",3);
- m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",v_TradingAPIVersion);
- m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName);
- m_Headers.put("X-EBAY-API-IAF-TOKEN",v_AccessToken);
- //
- // build params
- m_Params = Map();
- m_Params.put("WarningLevel","High");
- m_Params.put("ErrorLanguage","en_GB");
- m_AppDeliveryPrefs = Map();
- m_AppDeliveryPrefs.put("AlertEmail","mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.");
- m_AppDeliveryPrefs.put("AlertEnable","Enable");
- m_AppDeliveryPrefs.put("ApplicationEnable","Enable");
- m_AppDeliveryPrefs.put("ApplicationURL",v_CrmRestFunction);
- m_AppDeliveryPrefs.put("DeviceType","Platform");
- m_DeliveryURL = Map();
- m_DeliveryURL.put("DeliveryURL",v_CrmRestFunction);
- m_DeliveryURL.put("DeliveryURLName","eBayToZoho");
- m_AppDeliveryPrefs.put("DeliveryURLDetails",m_DeliveryURL);
- m_Params.put("ApplicationDeliveryPreferences",m_AppDeliveryPrefs);
- /* only used for wireless applications?
- m_EventProperty=Map();
- m_EventProperty.put("EventType","FixedPriceTransaction");
- m_Params.put("EventProperty",m_EventProperty);
- */
- // include the User Delivery Preference Array
- l_UserDeliveryPreferenceArray = List();
- m_EventPair = Map();
- m_EventPair.put("EventType","FixedPriceTransaction");
- m_EventPair.put("EventEnable","Enable");
- l_UserDeliveryPreferenceArray.add(m_EventPair);
- m_EventPair = Map();
- m_EventPair.put("EventType","Feedback");
- m_EventPair.put("EventEnable","Enable");
- l_UserDeliveryPreferenceArray.add(m_EventPair);
- m_NotificationEnable = Map();
- m_NotificationEnable.put("NotificationEnable",l_UserDeliveryPreferenceArray);
- m_Params.put("UserDeliveryPreferenceArray",m_NotificationEnable);
- //
- // convert to xml and replace root nodes
- x_Params = m_Params.toXML();
- x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
- x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>");
- //info x_Params;
- //
- // send the request XML as a string
- r_ResponseXML = invokeUrl
- [
- url :v_Endpoint
- type :POST
- parameters:x_Params
- headers:m_Headers
- ];
- info r_ResponseXML;
- }
- }
Success Response
You should get something like the following on a successful subscription:
<?xml version="1.0" encoding="UTF-8"?> <SetNotificationPreferencesResponse xmlns="urn:ebay:apis:eBLBaseComponents"> <Timestamp>2021-09-20T19:50:29.964Z</Timestamp> <Ack>Success</Ack> <Version>1173</Version> <Build>E1173_CORE_APINOTIFY_19146596_R1</Build> </SetNotificationPreferencesResponse>
- <?xml version="1.0" encoding="UTF-8"?>
- <SetNotificationPreferencesResponse
- xmlns="urn:ebay:apis:eBLBaseComponents">
- <Timestamp>2021-09-20T19:50:29.964Z</Timestamp>
- <Ack>Success</Ack>
- <Version>1173</Version>
- <Build>E1173_CORE_APINOTIFY_19146596_R1</Build>
- </SetNotificationPreferencesResponse>
Re-run GetNotificationPreferences
Just as a double-tap, let's run my GetNotificationPreferences function above specifying the "PreferenceLevel" to "User" to see the user notifications I just created. I get the following response:
<?xml version="1.0" encoding="UTF-8"?> <GetNotificationPreferencesResponse xmlns="urn:ebay:apis:eBLBaseComponents"> <Timestamp>2021-09-20T20:14:17.077Z</Timestamp> <Ack>Success</Ack> <Version>1173</Version> <Build>E1173_CORE_APINOTIFY_19146596_R1</Build> <UserDeliveryPreferenceArray> <NotificationEnable> <EventType>Feedback</EventType> <EventEnable>Enable</EventEnable> </NotificationEnable> <NotificationEnable> <EventType>FixedPriceTransaction</EventType> <EventEnable>Enable</EventEnable> </NotificationEnable> </UserDeliveryPreferenceArray> </GetNotificationPreferencesResponse>
- <?xml version="1.0" encoding="UTF-8"?>
- <GetNotificationPreferencesResponse
- xmlns="urn:ebay:apis:eBLBaseComponents">
- <Timestamp>2021-09-20T20:14:17.077Z</Timestamp>
- <Ack>Success</Ack>
- <Version>1173</Version>
- <Build>E1173_CORE_APINOTIFY_19146596_R1</Build>
- <UserDeliveryPreferenceArray>
- <NotificationEnable>
- <EventType>Feedback</EventType>
- <EventEnable>Enable</EventEnable>
- </NotificationEnable>
- <NotificationEnable>
- <EventType>FixedPriceTransaction</EventType>
- <EventEnable>Enable</EventEnable>
- </NotificationEnable>
- </UserDeliveryPreferenceArray>
- </GetNotificationPreferencesResponse>
Auth'n'auth (Authentication and Authorization) Process
Not getting notification via the URL but you are getting them via email? Well I read somewhere you need to use Auth'n'auth to enable these notifications if you don't want to sit on a call with eBay. If you use Oauth as above then contact eBay and ask them to enable it once you've run the above function. For me, I didn't have this patience and find it more fun to write another function that will generate the Auth'n'auth token.
Here is a reminder on what my Zoho Creator form looks like for API Integrations and the fields I refer to:
For the next steps, it's best if you create these 2 functions beforehand, as there isn't much time between getting the Session ID, logging in, agreeing, and then running the second function to get the FetchToken.
So first, I need a function to get me a Session ID. Once I've used this and signed in once, it will last a few seconds, long enough for me to do my Fetch Auth'n'auth token process:
string API.fn_eBayConnect_AuthToken_GetSessionUrl() { /* Function: fn_eBayConnect_AuthToken_GetSessionUrl() Purpose: Gets a SessionID to use the Auth'n'Auth (Authentication and Authorization) method instead of Oauth Date Created: 2021-09-22 (Joellipman.com - Joel Lipman) - Initial release More Info: - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading - Getting Tokens Documentation: https://developer.ebay.com/devzone/guides/features-guide/default.html#basics/Tokens.html - Making a Call Documentation: https://developer.ebay.com/devzone/xml/docs/Concepts/MakingACall.html#auth - Get a Session ID Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/getsessionid.html */ v_SessionURL = ""; r_Api = API_Integration[Connection_Name == "eBay API (Production)"]; if(r_Api.count() > 0) { v_TradingAPIVersion = r_Api.API_Version; v_Endpoint = "https://api.ebay.com/ws/api.dll"; v_ApiCallName = "GetSessionID"; // // first we need to make a quick call to get a session ID m_Headers = Map(); m_Headers.put("X-EBAY-API-SITEID",3); m_Headers.put("X-EBAY-API-CALL-NAME",v_ApiCallName); m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version); m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID); m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID); m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret); m_Params = Map(); m_Params.put("WarningLevel","High"); m_Params.put("ErrorLanguage","en_GB"); m_Params.put("RuName",r_Api.Redirect_URI); // // convert to xml and replace root nodes x_Params = m_Params.toXML(); x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><"+v_ApiCallName+"Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">"); x_Params = x_Params.toString().replaceFirst("</root>","</"+v_ApiCallName+"Request>"); // // send the request r_ResponseXML = invokeurl [ url :v_Endpoint type :POST parameters:x_Params headers: m_Headers ]; // parse out the SessionID v_SessionID = ""; if(r_ResponseXML.contains("<Ack>Success</Ack>")) { // tidy up the response so we can executeXPath x_Response = r_ResponseXML.executeXPath("/*/*").toXmlList(); for each x_Node in x_Response { if(x_Node.contains("<SessionID")) { v_SessionID = x_Node.getSuffix(">").getPrefix("<"); } } } // info r_ResponseXML; if(v_SessionID!="") { // write back to my field and store it temporarily r_Api.Session_ID = v_SessionID; // Sandbox link: // v_SessionURL = "https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&RuName="+r_Api.Redirect_URI+"&SessID="+zoho.encryption.urlEncode(v_SessionID); // Production link: v_SessionURL = "https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName="+r_Api.Redirect_URI+"&SessID="+zoho.encryption.urlEncode(v_SessionID); } } return v_SessionURL; }
- string API.fn_eBayConnect_AuthToken_GetSessionUrl()
- {
- /*
- Function: fn_eBayConnect_AuthToken_GetSessionUrl()
- Purpose: Gets a SessionID to use the Auth'n'Auth (Authentication and Authorization) method instead of Oauth
- Date Created: 2021-09-22 (Joellipman.com - Joel Lipman)
- - Initial release
- More Info:
- - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- - Getting Tokens Documentation: https://developer.ebay.com/devzone/guides/features-guide/default.html#basics/Tokens.html
- - Making a Call Documentation: https://developer.ebay.com/devzone/xml/docs/Concepts/MakingACall.html#auth
- - Get a Session ID Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/getsessionid.html
- */
- v_SessionURL = "";
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- if(r_Api.count() > 0)
- {
- v_TradingAPIVersion = r_Api.API_Version;
- v_Endpoint = "https://api.ebay.com/ws/api.dll";
- v_ApiCallName = "GetSessionID";
- //
- // first we need to make a quick call to get a session ID
- m_Headers = Map();
- m_Headers.put("X-EBAY-API-SITEID",3);
- m_Headers.put("X-EBAY-API-CALL-NAME",v_ApiCallName);
- m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version);
- m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID);
- m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID);
- m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret);
- m_Params = Map();
- m_Params.put("WarningLevel","High");
- m_Params.put("ErrorLanguage","en_GB");
- m_Params.put("RuName",r_Api.Redirect_URI);
- //
- // convert to xml and replace root nodes
- x_Params = m_Params.toXML();
- x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><"+v_ApiCallName+"Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
- x_Params = x_Params.toString().replaceFirst("</root>","</"+v_ApiCallName+"Request>");
- //
- // send the request
- r_ResponseXML = invokeUrl
- [
- url :v_Endpoint
- type :POST
- parameters:x_Params
- headers: m_Headers
- ];
- // parse out the SessionID
- v_SessionID = "";
- if(r_ResponseXML.contains("<Ack>Success</Ack>"))
- {
- // tidy up the response so we can executeXPath
- x_Response = r_ResponseXML.executeXPath("/*/*").toXmlList();
- for each x_Node in x_Response
- {
- if(x_Node.contains("<SessionID"))
- {
- v_SessionID = x_Node.getSuffix(">").getPrefix("<");
- }
- }
- }
- // info r_ResponseXML;
- if(v_SessionID!="")
- {
- // write back to my field and store it temporarily
- r_Api.Session_ID = v_SessionID;
- // Sandbox link:
- // v_SessionURL = "https://signin.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn&RuName="+r_Api.Redirect_URI+"&SessID="+zoho.encryption.urlEncode(v_SessionID);
- // Production link:
- v_SessionURL = "https://signin.ebay.com/ws/eBayISAPI.dll?SignIn&RuName="+r_Api.Redirect_URI+"&SessID="+zoho.encryption.urlEncode(v_SessionID);
- }
- }
- return v_SessionURL;
- }
string API.fn_eBayConnect_AuthToken_FetchToken() { /* Function: fn_eBayConnect_AuthToken_FetchToken() Purpose: Gets a token for the Auth'n'Auth (Authentication and Authorization) method instead of Oauth Date Created: 2021-09-22 (Joellipman.com - Joel Lipman) - Initial release More Info: - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading - FetchToken Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/FetchToken.html */ v_AuthToken = ""; r_Api = API_Integration[Connection_Name == "eBay API (Production)"]; if(r_Api.count() > 0) { v_TradingAPIVersion = r_Api.API_Version; v_Endpoint = "https://api.ebay.com/ws/api.dll"; v_ApiCallName = "FetchToken"; // // first we need to make a quick call to get a session ID m_Headers = Map(); m_Headers.put("X-EBAY-API-SITEID",3); m_Headers.put("X-EBAY-API-CALL-NAME",v_ApiCallName); m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version); m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID); m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID); m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret); m_Params = Map(); m_Params.put("WarningLevel","High"); m_Params.put("ErrorLanguage","en_GB"); m_Params.put("SessionID",r_Api.Session_ID); // // convert to xml and replace root nodes x_Params = m_Params.toXML(); x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_ApiCallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">"); x_Params = x_Params.toString().replaceFirst("</root>","</" + v_ApiCallName + "Request>"); //info x_Params; // // send the request r_ResponseXML = invokeurl [ url :v_Endpoint type :POST parameters:x_Params headers:m_Headers ]; // // parse out the AuthToken //info r_ResponseXML; v_SessionID = ""; if(r_ResponseXML.contains("<Ack>Success</Ack>")) { // tidy up the response so we can executeXPath x_Response = r_ResponseXML.executeXPath("/*/*").toXmlList(); for each x_Node in x_Response { if(x_Node.contains("<eBayAuthToken")) { v_AuthToken = x_Node.getSuffix(">").getPrefix("<"); r_Api.AuthToken=v_AuthToken; } if(x_Node.contains("<HardExpirationTime")) { v_AuthTokenExpiry = x_Node.getSuffix(">").getPrefix("<"); // yields something like 2023-03-16T22:53:56.000Z v_AuthTokenExpiry = v_AuthTokenExpiry.replaceAll("T"," ",true); // yields something like 2023-03-16 22:53:56.000Z v_AuthTokenExpiry = v_AuthTokenExpiry.getPrefix("."); // yields something like 2023-03-16 22:53:56 // has to match the datetime format of your Creator field r_Api.AuthToken_Expiry=v_AuthTokenExpiry; } } } } return v_AuthToken; }
- string API.fn_eBayConnect_AuthToken_FetchToken()
- {
- /*
- Function: fn_eBayConnect_AuthToken_FetchToken()
- Purpose: Gets a token for the Auth'n'Auth (Authentication and Authorization) method instead of Oauth
- Date Created: 2021-09-22 (Joellipman.com - Joel Lipman)
- - Initial release
- More Info:
- - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- - FetchToken Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/FetchToken.html
- */
- v_AuthToken = "";
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- if(r_Api.count() > 0)
- {
- v_TradingAPIVersion = r_Api.API_Version;
- v_Endpoint = "https://api.ebay.com/ws/api.dll";
- v_ApiCallName = "FetchToken";
- //
- // first we need to make a quick call to get a session ID
- m_Headers = Map();
- m_Headers.put("X-EBAY-API-SITEID",3);
- m_Headers.put("X-EBAY-API-CALL-NAME",v_ApiCallName);
- m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version);
- m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID);
- m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID);
- m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret);
- m_Params = Map();
- m_Params.put("WarningLevel","High");
- m_Params.put("ErrorLanguage","en_GB");
- m_Params.put("SessionID",r_Api.Session_ID);
- //
- // convert to xml and replace root nodes
- x_Params = m_Params.toXML();
- x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_ApiCallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
- x_Params = x_Params.toString().replaceFirst("</root>","</" + v_ApiCallName + "Request>");
- //info x_Params;
- //
- // send the request
- r_ResponseXML = invokeUrl
- [
- url :v_Endpoint
- type :POST
- parameters:x_Params
- headers:m_Headers
- ];
- //
- // parse out the AuthToken
- //info r_ResponseXML;
- v_SessionID = "";
- if(r_ResponseXML.contains("<Ack>Success</Ack>"))
- {
- // tidy up the response so we can executeXPath
- x_Response = r_ResponseXML.executeXPath("/*/*").toXmlList();
- for each x_Node in x_Response
- {
- if(x_Node.contains("<eBayAuthToken"))
- {
- v_AuthToken = x_Node.getSuffix(">").getPrefix("<");
- r_Api.AuthToken=v_AuthToken;
- }
- if(x_Node.contains("<HardExpirationTime"))
- {
- v_AuthTokenExpiry = x_Node.getSuffix(">").getPrefix("<");
- // yields something like 2023-03-16T22:53:56.000Z
- v_AuthTokenExpiry = v_AuthTokenExpiry.replaceAll("T"," ",true);
- // yields something like 2023-03-16 22:53:56.000Z
- v_AuthTokenExpiry = v_AuthTokenExpiry.getPrefix(".");
- // yields something like 2023-03-16 22:53:56
- // has to match the datetime format of your Creator field
- r_Api.AuthToken_Expiry=v_AuthTokenExpiry;
- }
- }
- }
- }
- return v_AuthToken;
- }
If successful, your API Integration form will now have an AuthToken that lasts pretty much as long as a Refresh Token used in OAuth. So where were we? Ah yes, let's try subscribing to/enabling our notifications with this process instead:
void API.fn_eBayQuery_SetNotificationPreferences_AuthNAuth()
{
/*
Function: fn_eBayQuery_SetNotificationPreferences_AuthNAuth()
Purpose: Manage notification and alert preferences for a user or an application using Auth'n'Auth not Oauth
Date Created: 2021-09-23 (Joellipman.com - Joel Lipman)
- Initial release
More Info:
- API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html
- SetNotificationPreferences Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/SetNotificationPreferences.html
- Event Types Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/extra/stntfctnprfrncs.rqst.evntprprty.evnttyp.html
*/
r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
if(r_Api.count() > 0)
{
v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken();
//info v_AccessToken;
v_TradingAPIVersion = r_Api.API_Version;
v_Endpoint = "https://api.ebay.com/ws/api.dll";
v_APICallName = "SetNotificationPreferences";
//
// specify the URL of the CRM REST API Function here (can be a mailto:email@address)
v_CrmRestFunction = "https://www.zohoapis.com/crm/v2/functions/fn_ebay_webhook_ordernotification/actions/execute?auth_type=apikey&zapikey=1003.aaaabbbbccccddddeeeeffff11112222.33334444555566667777888899990000";
//
// build header
m_Headers = Map();
m_Headers.put("X-EBAY-API-SITEID",3);
m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName);
m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version);
m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID);
m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID);
m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret);
//
// build params
m_Params = Map();
m_Params.put("WarningLevel","High");
m_Params.put("ErrorLanguage","en_GB");
m_AuthToken=Map();
m_AuthToken.put("eBayAuthToken",r_Api.AuthToken);
m_Params.put("RequesterCredentials",m_AuthToken);
m_AppDeliveryPrefs = Map();
m_AppDeliveryPrefs.put("AlertEmail","mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.");
m_AppDeliveryPrefs.put("AlertEnable","Enable");
m_AppDeliveryPrefs.put("ApplicationEnable","Enable");
m_AppDeliveryPrefs.put("ApplicationURL",v_CrmRestFunction);
m_AppDeliveryPrefs.put("DeviceType","Platform");
m_DeliveryURL = Map();
m_DeliveryURL.put("DeliveryURL",v_CrmRestFunction);
m_DeliveryURL.put("DeliveryURLName","eBayToZoho");
m_AppDeliveryPrefs.put("DeliveryURLDetails",m_DeliveryURL);
m_Params.put("ApplicationDeliveryPreferences",m_AppDeliveryPrefs);
// include the User Delivery Preference Array
l_UserDeliveryPreferenceArray = List();
m_EventPair = Map();
m_EventPair.put("EventType","FixedPriceTransaction");
m_EventPair.put("EventEnable","Enable");
l_UserDeliveryPreferenceArray.add(m_EventPair);
m_EventPair = Map();
m_EventPair.put("EventType","Feedback");
m_EventPair.put("EventEnable","Enable");
l_UserDeliveryPreferenceArray.add(m_EventPair);
m_NotificationEnable = Map();
m_NotificationEnable.put("NotificationEnable",l_UserDeliveryPreferenceArray);
m_Params.put("UserDeliveryPreferenceArray",m_NotificationEnable);
//
// convert to xml and replace root nodes
x_Params = m_Params.toXML();
x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>");
info x_Params;
//
// send the request XML as a string
r_ResponseXML = invokeurl
[
url :v_Endpoint
type :POST
parameters:x_Params
headers:m_Headers
];
info r_ResponseXML;
}
}
- void API.fn_eBayQuery_SetNotificationPreferences_AuthNAuth()
- {
- /*
- Function: fn_eBayQuery_SetNotificationPreferences_AuthNAuth()
- Purpose: Manage notification and alert preferences for a user or an application using Auth'n'Auth not Oauth
- Date Created: 2021-09-23 (Joellipman.com - Joel Lipman)
- - Initial release
- More Info:
- - API Explorer Test Tool: https://developer.ebay.com/DevZone/build-test/test-tool/default.aspx?index=0&env=production&api=trading
- - GetNotificationPreferences Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/GetNotificationPreferences.html
- - SetNotificationPreferences Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/SetNotificationPreferences.html
- - Event Types Documentation: https://developer.ebay.com/Devzone/XML/docs/Reference/eBay/extra/stntfctnprfrncs.rqst.evntprprty.evnttyp.html
- */
- r_Api = API_Integration[Connection_Name == "eBay API (Production)"];
- if(r_Api.count() > 0)
- {
- v_AccessToken = thisapp.API.fn_eBayConnect_AccessToken();
- //info v_AccessToken;
- v_TradingAPIVersion = r_Api.API_Version;
- v_Endpoint = "https://api.ebay.com/ws/api.dll";
- v_APICallName = "SetNotificationPreferences";
- //
- // specify the URL of the CRM REST API Function here (can be a mailto:email@address)
- v_CrmRestFunction = "https://www.zohoapis.com/crm/v2/functions/fn_ebay_webhook_ordernotification/actions/execute?auth_type=apikey&zapikey=1003.aaaabbbbccccddddeeeeffff11112222.33334444555566667777888899990000";
- //
- // build header
- m_Headers = Map();
- m_Headers.put("X-EBAY-API-SITEID",3);
- m_Headers.put("X-EBAY-API-CALL-NAME",v_APICallName);
- m_Headers.put("X-EBAY-API-COMPATIBILITY-LEVEL",r_Api.API_Version);
- m_Headers.put("X-EBAY-API-APP-NAME",r_Api.Client_ID);
- m_Headers.put("X-EBAY-API-DEV-NAME",r_Api.Dev_ID);
- m_Headers.put("X-EBAY-API-CERT-NAME",r_Api.Client_Secret);
- //
- // build params
- m_Params = Map();
- m_Params.put("WarningLevel","High");
- m_Params.put("ErrorLanguage","en_GB");
- m_AuthToken=Map();
- m_AuthToken.put("eBayAuthToken",r_Api.AuthToken);
- m_Params.put("RequesterCredentials",m_AuthToken);
- m_AppDeliveryPrefs = Map();
- m_AppDeliveryPrefs.put("AlertEmail","mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.");
- m_AppDeliveryPrefs.put("AlertEnable","Enable");
- m_AppDeliveryPrefs.put("ApplicationEnable","Enable");
- m_AppDeliveryPrefs.put("ApplicationURL",v_CrmRestFunction);
- m_AppDeliveryPrefs.put("DeviceType","Platform");
- m_DeliveryURL = Map();
- m_DeliveryURL.put("DeliveryURL",v_CrmRestFunction);
- m_DeliveryURL.put("DeliveryURLName","eBayToZoho");
- m_AppDeliveryPrefs.put("DeliveryURLDetails",m_DeliveryURL);
- m_Params.put("ApplicationDeliveryPreferences",m_AppDeliveryPrefs);
- // include the User Delivery Preference Array
- l_UserDeliveryPreferenceArray = List();
- m_EventPair = Map();
- m_EventPair.put("EventType","FixedPriceTransaction");
- m_EventPair.put("EventEnable","Enable");
- l_UserDeliveryPreferenceArray.add(m_EventPair);
- m_EventPair = Map();
- m_EventPair.put("EventType","Feedback");
- m_EventPair.put("EventEnable","Enable");
- l_UserDeliveryPreferenceArray.add(m_EventPair);
- m_NotificationEnable = Map();
- m_NotificationEnable.put("NotificationEnable",l_UserDeliveryPreferenceArray);
- m_Params.put("UserDeliveryPreferenceArray",m_NotificationEnable);
- //
- // convert to xml and replace root nodes
- x_Params = m_Params.toXML();
- x_Params = x_Params.toString().replaceFirst("<root>","<?xml version=\"1.0\" encoding=\"utf-8\"?><" + v_APICallName + "Request xmlns=\"urn:ebay:apis:eBLBaseComponents\">");
- x_Params = x_Params.toString().replaceFirst("</root>","</" + v_APICallName + "Request>");
- info x_Params;
- //
- // send the request XML as a string
- r_ResponseXML = invokeUrl
- [
- url :v_Endpoint
- type :POST
- parameters:x_Params
- headers:m_Headers
- ];
- info r_ResponseXML;
- }
- }
Great! Now you should see notifications come in via your email (now comment this out in your CRM before it drives you insane) but also, and if setup correctly, sent through to your Creator app, all without having to speak to someone from eBay. Done!
Error(s) Encountered
- 22112 - Missing property name or event type: Could have been many things. For me it was because I was submitting an EventType in the EventProperty container and the fix was not to include the EventProperty container at all.
- Subscription was successful but still no notifications received: If you are using OAuth, you need to tell someone at eBay to enable the notification. Try using the Auth'n'Auth method.
- Header "X-EBAY-API-APP-NAME" does not exist.: Using an Auth'n'auth instead of Oauth? You will need this in the HTTP Headers.
- Header "X-EBAY-API-DEV-NAME" does not exist: Using an Auth'n'auth instead of Oauth? You will need this in the HTTP Headers.
- Header "X-EBAY-API-CERT-NAME" does not exist.: Using an Auth'n'auth instead of Oauth? You will need this in the HTTP Headers.
- No password and no token: No XML <RequestPassword> or <RequestToken> was found in XML Request.: Forgot to add the container RequesterCredentials in the request body.
- Unsupported API Call: The API call "GeteBayOfficialTime" is invalid or not supported in this release.: Happened to me when making a GetSessionIDRequest for an Auth'n'auth process. I hadn't included the 3 main headers for auth'n'auth: app-name, dev-name, cert-name.
Source(s):
- Joellipman.com - Zoho Creator: Push to eBay Listings
- eBay Trading API - API Explorer Test Tool
- eBay Trading API - Platform Notifications API - GetNotificationPreferences Documentation
- eBay Trading API - Platform Notifications API - SetNotificationPreferences Documentation
- Joellipman.com - Zoho Creator: Receive JSON via a Shopify Webhook
- eBay Trading API - Platform Notifications API - Event Types
- eBay Trading API - Auth'n'Auth