question

qtnh1416 avatar image
0 Likes"
qtnh1416 asked

Google App Scripts: Authorization and Authentication Failed, need one-time authorization on eBay

Dear!

I am developing an sheet app on Google Apps Script.

I would like to access Sell Inventory on eBay as below. I want to update inventory quantity as well.

https://developer.ebay.com/api-docs/sell/inventory/resources/inventory_item/methods/createOrReplaceInventoryItem#_samples


I tried to access eBay API by OAthau2 as picture image. Follow google app scripts code. But eBay API response failed and request User do consent/ login. It doesn't work with our processing automatically.

temp-1.png

Here is sample code: https://github.com/googleworkspace/apps-script-oauth2/blob/master/samples/Google.gs


image_480.png

Here is document of eBay say about authentication:
https://developer.ebay.com/api-docs/static/oauth-authorization-code-grant.html


Could we have an one-time token/ simple Auth and Auth ?

[Purpose] Automatically update inventory on ebay

[Problem] There is a problem with API linkage work (authentication is required many times on the client side when connecting APIs)

[Solution] To eliminate the need for authentication each time by using a refresh token.

[Result] But rewriting the code did not work (currently)
---------------------------
[What we want you to do]
About adaptation of refresh token

tokenauthentication failedauthorization
image-480.png (44.9 KiB)
temp-1.png (80.7 KiB)
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.