Getting error in api call unauthorize

user348913
Participant

hiii 

iam new in constant contact i requested api call  using react js for testing the contact constant but iam getting error of network error in browser console, when i run on postman it show unauthorize can any one help me to fix where i miss the steps

and did i passes the apikey and token correctly??

    useEffect(() => {
        const axios = require('axios');

        let config = {
          method: 'get',
          headers: {
            'ACCESS_TOKEN': 'Bearer {epf**********AHqAFw}',
            'API_KEY': '09********1ce5c',
            'Accept':'application/json',
          }
        };
       
        axios(config)
        .then((response) => {
          console.log(JSON.stringify(response.data));
        })
        .catch((error) => {
          console.log(error);
        });
       
    }, [])
 
 
one last one- is the secret key i got is the bearer token ??
1 REPLY 1
Amanda_G
Employee

Hi @user348913 , 

 

I would recommend reaching out to web services team for anything API related. They can be reached at webservices@constantcontact.com. You may also want to visit developer.constantcontact.com for some API related assistance. 


Amanda G.
Community & Social Care
Did I answer your question? If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

You're not alone on your email marketing journey. Connect with a Marketing Advisor to see how they can help you develop the right strategy for your business and get the most out of your Constant Contact experience.
Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up