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
Best 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.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1
Answers
-
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:
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
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.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
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.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
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.
0 -
@Fatias true, i believe you would have to have the direct sign on exception enabled to use this method.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
@Fatias @jaeW_at_Onyx I am trying to implement this as well and we also have SSO enabled, how would i get the password needed for the body
0 -
@Jmoreno if you are using the full auth snippet I provided, you have to use your Domo password (not your identity provider password) AND you have to have direct sign on enabled.
If you are not able to use that approach, @GrantSmith 's response was correct, you have to authenticate using x-domo-developer-token
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
@jaeW_at_Onyx Thanks for the help. I was able to get my admin to enable direct sign-on for me and that solved the issue and everything is working fine.
Love the channel and videos by the way, SUPER HELPFUL!!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive