Domo instance API - Method Not Allowed

We want to interact with our Domo instance via scripting namely for triggering a Magic ETL or MySQL dataflow. We noticed that there is a way to interact with the API for our Domo instance by using first an authentication method.

However, when we tried to use that method (either in Python scripting or in Postman) it returns the message of "Method Not Allowed" when we were expecting a successful message with a session token.

Notice that we are trying to connect to "our_domo_instance.domo.com" and not to "api.domo.com"

What could be the possible cause? Are we missing here some security requirement that has to be configured?

Thank you

Tagged:

Best Answer

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤
    Accepted Answer
    export const get_authToken_domo = async (EMAIL, PASSWORD, DOMO_INSTANCE) => {
      const auth_url = `https://${DOMO_INSTANCE}.domo.com/api/content/v2/authentication`;
    
    
      const body = {
        method: 'password',
        emailAddress: EMAIL,
        password: PASSWORD,
      };
    
    
      let resp = await fetch(auth_url, {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(body),
      });
    
    
      const data = await resp.json();
      return data.sessionToken;
    };
    
    
    

    just tested. this works.

Answers

  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟤

    I believe you need to start using the client ID and secret with OAuth 2.0 in order to connect now. You may want to review this page:


  • GrantSmith
    GrantSmith Indiana 🔴

    Hi @Fatias

    If you're trying to connect to your_instance.domo.com you'd need an authenticated API key and pass that into the 'X-DOMO-Developer-Token' header. This is how you can authenticate with your instance APIs and not the api.domo.com APIs. You can generate a token under Admin -> Authentication -> Access Tokens.

    This will authenticate your requests to the different API endpoints based upon the user who created the Access Token.

  • Fatias
    Fatias ⚪️

    Thanks @jaeW_at_Onyx

    I was doing the same procedure in Python but probably had some typo because I copy paste your endpoint and the other text and it is working now!

    Just a side note: we have our Domo instance connected with our identity provider to allow Single Sign-On (SSO) and we noticed that the password that works under the body of the request is the password stored internally in Domo and not the password from our identity provider.

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    @Fatias true, i believe you would have to have the direct sign on exception enabled to use this method.