Expand my Community achievements bar.

Unknown auth type, supported IMS OAuth or Commerce OAuth1. Please review documented auth types

Avatar

Level 3

I am creating a custom client to get all products. I just created a child function in commerce-product-api-client.js 

async function getAllProduct (baseUrl, params, logger) {
logger.info(`baseUrl:${baseUrl} \n params:${JSON.stringify(params)}`)

const client = await getClient(
{
url: baseUrl,
params
},
logger
)
logger.info(`client status :${client}`)
return await client.get(`products?searchCriteria[PageSize]=10`)
}
I am getting an error: Unknown auth type, supported IMS OAuth or Commerce OAuth1. Please review documented auth types.
I am getting the right URL:https://abc.com/rest/
 
1 Reply

Avatar

Employee

The error you are receiving is thrown in this line https://github.com/adobe/commerce-integration-starter-kit/blob/7ed3d1ed4e0ae0b54089dc909257d83be6ba4...

 and it indicates that the rutime action has not received a set or inputs to be able to authenticate when trying to hit the Commerce API.

 

If you are targeting an Adobe Commerce instance on PaaS, please make sure that the following vars are filled in the .env file:

  • COMMERCE_CONSUMER_KEY
  • COMMERCE_CONSUMER_SECRET
  • COMMERCE_ACCESS_TOKEN
  • COMMERCE_ACCESS_TOKEN_SECRET

(see https://github.com/adobe/commerce-integration-starter-kit/blob/7ed3d1ed4e0ae0b54089dc909257d83be6ba4...)

 

If you are targeting an Adobe Commerce instance as a Cloud Service (ACCS) instance, make sure these are informed in the .env file

  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • OAUTH_SCOPES

 

(See https://github.com/adobe/commerce-integration-starter-kit/blob/7ed3d1ed4e0ae0b54089dc909257d83be6ba4...)

 

Please refer to https://github.com/adobe/commerce-integration-starter-kit?tab=readme-ov-file#supported-auth-types to get to know the different options when authenticating with Adobe Commerce from App Builder extensions