Skip to content

Could not get it to work #9

@lirankor

Description

@lirankor

I have tried to implement without success:

// Import the SDK
import { DropshipperClient } from "ae_sdk";

// Initialize the SDK (replace with actual parameters if needed)
const client = new DropshipperClient({
    app_key: 'XXXXX',
    app_secret: 'XXXXXXXX',
    session: "oauth_access_token"
});

async function getProductData(productId) {
    try {
      const productData = await client.productDetails({
        product_id: productId,
        ship_to_country: 'US',
        target_currency: 'USD',
        target_language: 'en',
      });
      console.log(productData);
    } catch (error) {
      console.error(`An error occurred: ${error.message}`);
    }
  }

// Example usage
const productId = '3256806022897905';
getProductData(productId);

Using correct key / secret

{
  ok: false,
  message: 'Bad request',
  error_response: {
    type: 'ISV',
    code: 'IllegalAccessToken',
    msg: 'The specified access token is invalid or expired',
    request_id: 'xxxx'
  },
  request_id: 'xxxx'
}

Did I miss anything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions