For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

How to interact with Open eBay Application Services

  • Answer ID 1374
  • Published 03/10/2009 05:42 AM
  • Updated 10/21/2013 01:23 PM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=1374
How do I  interact with Open eBay Application Services?

Summary   

  Open eBay Apps summary gadgets are presented on the Summary page of Selling Manager. There are two content types for gadgets, HTML and URL.  An Open eBay application can include both or either type of gadget(s).

  To interact with Open eBay Application service, you need to set up a web application that

    1. Listens to these user events: Subscribe/Unsubscribe and Application Start  (a HTML-type ONLY application does not  need to listen Application Start user events.)

    2. Authencates the digital signed XML document or requstion parameters with eBay Public Key and your Selling Manager application CertID

    3. Sends response with Subscribe event status for Subscribe/Unsubscribe events

    4. For URL-type application, renders your application when the received request parameters are verified .


Detailed Description

1. When the Subscribe/Unsubscribe button is clicked.   

Image
      a) eBay sends addSubscriber or removeSubscriber request xml document via HTTP POST request by appending the cmd=addSubscriber or cmd=removeSubscriber parameter to the EndPoint.Management URL specified in your Selling Manager Applicatons Deployment Descriptor.

addSubscriberRequest

<?xml version="1.0" encoding="UTF-8"?>
<addSubscriberRequest xmlns="http://www.ebay.com/marketplace/services">
  <credentials appId="your_app_id">
    <token type="Value">
      <tokenValue>token_value</tokenValue>
      <signature>signature_value</signature>
    </token>
  </credentials>
  <userInfo>
    <userName>bookseller</userName>
  </userInfo>
  <subscriptionInfo>
    <subscriptionId>5000004267</subscriptionId>
    <planId>5000000627</planId>
    <planName>EasyBill</planName>
    <externalPlanId>ARKLS3</externalPlanId>
  </subscriptionInfo>
</addSubscriberRequest> 

removeSubscriberRequest  

<?xml version="1.0" encoding="UTF-8"?>
<removeSubscriber xmlns="http://www.ebay.com/marketplace/services">
  <credentials appId="your_app_id">
    <token type="Value">
      <tokenValue>token_value</tokenValue>
      <signature>signature_value</signature>
    </token>
  </credentials>
  <userInfo>
    <userName>magicalbookseller</userName>
  </userInfo>
  <subscriptionInfo>
    <subscriptionId>5000004267</subscriptionId>
    <planId>5000000627</planId>
    <planName>EasyBill</planName>
    <externalPlanId>ARKLS3</externalPlanId>
  </subscriptionInfo>
</removeSubscriber> 

      b) Upon receiving the subscription request xml document, your web application should authenticate request to verify the digital signature signature with eBay Public Key and decrypt the digital signed tokenValue returned in the subscription calls 

      c) Then, your application needs to send addSubscriberResponse with Approved/Rejected/Pending status to allow/reject the user to access your application, or removeSubscriberResponse to notify eBay that you have received the user's unsubscriber request. Here are the sample addSubscriberResponse and removeSubscriberResponse xmls.  

 addSubscriberResponse

<?xml version="1.0" encoding="UTF-8"?>
<addSubscriberResponse xmlns="http://www.ebay.com/marketplace/services">
  <ack>Success</ack>
  <timestamp>2009-05-18T16:34:09.423-0700</timestamp>
  <status>Approved</status>
  <message>Subscription Approved</message>
  <subscriptionId>5000004267</subscriptionId>
</addSubscriberResponse> 

removeSubscriberResponse

<?xml version="1.0" encoding="UTF-8"?>
<removeSubscriberResponse xmlns="http://www.ebay.com/marketplace/services">
  <ack>Success</ack>
  <timestamp>2009-05-18T16:34:09.423-0700</timestamp>
</removeSubscriberResponse> 

     

2.  For URL-type application, after a user is successfully subscribed, the Start button would be activated for that application.

  When the Start button is clicked: 

Image 
  
  a) eBay appends some parameters and sends a Start HTTP POST request to the URL that you specified in your DD.  

<Content type="url" view="canvas" href="http://url/myentrypointURLhere" preferred_height="800">

    b) Upon receiving the Start HTTP POST request,  your web application should authenticate the request by verifying the value of SG parameter, eBay digital signature with eBay Public Key and obtain User Auth Token ( it is the same token that passed to your application  in addSubscriber request for the subscriber) by decrypting  the value of  the ST request parameter with your Open eBay Application CertID.

   c) Render your application when the received  HTTP POST parameters are verified.

 

 NOTE. 1. Open eBay Participant Interface only supports HTTP POST method.

             2. Open eBay Participant Interface API only supports XML format. You can  manually change OpeneBayParticipantInterfaceService.wsdl into an XSD file if required.

             3. Digital Signature Authentication and User Token Decryption sample code for most used development environments, PHP, C#, JAVA, PERL, in ebay developer community can be found here.


 


Additional Information

Documentation:  Open eBay Apps User Guide

File Attachments

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter