GithubHelp home page GithubHelp logo

Comments (4)

olliechick avatar olliechick commented on May 20, 2024

I think you need to do eBay.sell.account.getPrivileges()

from ebay-api.

doverradio avatar doverradio commented on May 20, 2024

Thanks olliechick.

I got a different result after making the change.

However, it resulted in a new error:

     data:
      { error: 'invalid_scope',
        error_description:
         'The requested scope is invalid, unknown, malformed, or exceeds the scope granted to the client' } }, 

I checked the getPrivileges ebay documentation and it says to use these oAuth scopes, which I thought I had done:

https://api.ebay.com/oauth/api_scope/sell.account
https://api.ebay.com/oauth/api_scope/sell.account.readonly

In fact, when double checking, I have done this now but it still gives error that requested scope is invalid...:

    eBay.auth.oAuth2.setScope([
      'https://api.ebay.com/oauth/api_scope',
      'https://api.ebay.com/oauth/api_scope/sell.account',
      'https://api.ebay.com/oauth/api_scope/sell.account.readonly'
  ]);

Were you able to successfully make this call before? If so, please share how. Thank you!

from ebay-api.

doverradio avatar doverradio commented on May 20, 2024

Nevermind, I solved it another way...


exports.getSellerLimits = async (req, res) => {  
  let {        
    ebayAuthToken,
    } = req.body

    if(ebayAuthToken == null) {
      res.status(400).json({error: `Missing ebay auth token.  Please try again with ebay auth token.`})
    }
   
    let result = await fetch(
      `https://api.ebay.com/sell/account/v1/privilege`, 
      {
        method: "GET",
        headers: {
          Authorization: `Bearer ${ebayAuthToken}`,
          Accept: "application/json",
          "Content-Type": "application/json"
        }
      }
      )


      let sellerPrivileges = await result.json()

      res.json(sellerPrivileges)


}


from ebay-api.

dantio avatar dantio commented on May 20, 2024

@olliechick has the correct answer. Check out the example: https://github.com/hendt/ebay-api/blob/next/examples/restful/sell/getPrivileges.ts

from ebay-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.