Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to generate a token differently?

63 views
Skip to first unread message

Jason

unread,
Aug 25, 2024, 11:53:29 PM8/25/24
to FatSecret Platform API
Hello,
Currently, I put my client ID in my IOS code and it generates a different token every time when I search. I feel like it's not a good way to do this.

In the documentation, it shows Please avoid having your client's credentials part of your Mobile App source code. Is there a different way to generate the token and communicate with the API?

Thanks a lot,

Jason

Mikael Tenshio

unread,
Aug 26, 2024, 2:43:21 AM8/26/24
to FatSecret Platform API
if you are still in development, locally testing your application means your client id and secret is present in the source code specially if you put the id and secret in any part of your framework or project which will be bundled when you convert it to an application. you should fetch token in a server and put the id and secret in a .env file so that it is not presented in any source code of your application. 
Reply all
Reply to author
Forward
0 new messages