saganos / yazio_public_api

Yazio Nutrition App public API description
MIT License
11 stars 6 forks source link
api nutrition yazio yazio-api

Yazio API description

What

Public API description for Yazio application.

Why?

After waiting for more than one year for public API description I was tired. Some functions are still missing (i.e. Share saved meal with other people) - should be easier now to create it as a plugin / extension / additional webapp

How to install

npm i node-fetch --save

Documentation

A swagger.json file was added. You can use the public swagger editor to paste/import it and play around.

ℹ️ The OAuth part works. You can log in and retrieve a valid token.

⚠️ The other endpoints won't work in the swagger UI, as long as you are playing around using the public swagger editor. The reason is that yazio has CORS security rules enabled that can only be omitted using HTTP or localhost clients. You can use the client credentials that are posted in this repository.

Examples:

Login

node examples/login.js

login.js - Login to Yazio App with login and password using OAUTH2


Token refresh

node examples/token_refresh.js

token_refresh.js - Refresh login token

Get user info

node examples/get_user_info.js

get_user_info.js - Gets user info