snippets_js
Integration
New integration from credential
const axiosClient = yepcode.integration.axiosOauth10a('credential-slug')
New integration from plain authentication data
const axios = require("axios");
const { default: addOAuthInterceptor } = require("axios-oauth-1.0a");
const axiosClient = axios.create({
baseURL: 'https://some-domain.com/api/',
headers: {'X-Custom-Header': 'foobar'}
});
const options = {
key: "your-oauth-consumer-key",
secret: "your-oauth-consumer-secret",
token: "your-oauth-token",
tokenSecret: "your-oauth-token-secret",
verifier: "your-oauth-verifier"
};
addOAuthInterceptor(axiosClient, options);
tip
After your have created this client you can use any of the Axios snippets.