REST API on deploy to heroku

I have created an application with Cuba Platform. I have added the REST API addon.

  • Next I have checked the rest auth settings in
  • Next I have added the rest-api-access to the admin user.
  • Next I have set up the connedction in Postman or CURL as follows:

Run from localhost

> curl --location --request POST 'https://localhost:8080/app/rest/v2/oauth/token' \>     -header 'Authorization: Basic ZGVtby02NmhoUzJBTDpiMTY0NTAwZjVmNjhlZDVmNmE1MDJiMjk2ZTBjNTJmMzJjODI5ZTVkMWQ3OGYwZGIxNjQ0YmFkYzgxYzU3MTI4' \>     --header 'Content-Type: application/x-www-form-urlencoded' \>     --data-urlencode 'grant_type=password' \>     --data-urlencode 'username=admin' \>     --data-urlencode 'password=admin'

When I execute the query everyting works as expected and a got a token.

When I have deployed the solution on th heroku I get unathorized when login on with same user and the same settings as on localhost.

I do use repository at Github, and on git push and upload of changes. A new build is made at Heroku. Does the settings in change on new build or do I have to create a file to load up to Heroku?

Did find out how to do it.

Copy and Paste and rename the new file to will be the correct file in prod or heroku.