Monday-code python quickstart local dev

Hi,

This is my first try building an integration app, and I was following quickstart-python on github, which is an integration example built with python’s flask.

I set up the monday.com app configuration from the description in SETUP.md (without the part of deploying the app to monday code).

After tunneling with the CLI, and running the application locally, I’m having problem with the authorization process: the auth endpoint is being called successfully, but the following flow is unsuccessful:
monday_request_auth (a wrapper for the authorize function in routes/auth.py file)
→ JWTService.decode_monday_jwt
→ SecretService.get_secret(SecretKeys.MONDAY_SIGNING_SECRET)
→ api_instance.get_secret(key)

The above is the function calls flow in the example, probably best to see the github project.

The signing_secret which is the result of the last function call returns NONE.

What should be updated in the code in order to have the app run locally?

Thanks,
Eyal

Hello there @eyalos and welcome to the community!

I hope you like it here :muscle:

There is a file called consts.py that has the information from your app such as the MONDAY_SIGNING_SECRET. Did you update that file?

You can find the signing secret in your app’s configuration page under “Basic information”.

Let me know how that goes!

Cheers,
Matias

Hi @Matias.Monday,

I didn’t update that file. I didn’t see instructions to do so in the project’s readme or setup.

Does consts.py should hold the actual values of the application’s configurations?
I thought env file is the one for that purpose.

What I still don’t understand is how this exact same app works when deployed to monday-code, without changing the consts.py file.

Thanks!

Hello there @eyalos,

I double-checked this with the team in charge of the quickstart guide.

They mentioned that you need to set an Environment Variable/Secret on your app (as shown here), which is currently only supported on monday code in the dev center.

Our team is working on a solution for local development but we do not have an ETA yet.

I am sorry for the previous message which was not accurate.

Let me know if you have any other questions!

Cheers,
Matias

Thanks @Matias.Monday for your reply.

Is it possible to use monday_code apis, for example SecretsApi, in a local environment? If so, what does it entail?

I’m suggesting removing the parts in the SETUP.md which imply local server is possible, it’s misleading.

I used it as an integration-app walkthrough, and it would be very beneficial if there was a “hello world” kind of app which can be run locally.
Maybe just removing monday_code apis can help to accomplish that.

In any case, Thank you very much.

Eyal

Hello again,

Matias here!

It is not possible to run this in your local server. The team is working so that in the future (no ETA) it will be possible.

The example you see is specifically for monday code. We do not have a “Hello world” app in Python as of today. We have this Node+React one :smile:

Cheers,
Matias