diff --git a/internal/cli/api.go b/internal/cli/api.go index 2c4fa1564..6fb310ef4 100644 --- a/internal/cli/api.go +++ b/internal/cli/api.go @@ -131,11 +131,16 @@ func apiCmdRun(cli *cli, inputs *apiCmdInputs) func(cmd *cobra.Command, args []s } bearerToken := cli.config.Tenants[cli.tenant].AccessToken - if bearerToken == "" { return errors.New("missing access token associated with tenant. Please re-authenticate by running `auth0 login`") } + cli.renderer.Infof("%+v", cli.config.Tenants) + cli.renderer.Infof("====================") + cli.renderer.Infof("%+v", cli.tenant) + cli.renderer.Infof("====================") + cli.renderer.Infof("%+v", cli.config.Tenants[cli.tenant]) + request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", bearerToken)) request.Header.Set("Content-Type", "application/json") request.Header.Set("User-Agent", fmt.Sprintf("%s/%s", userAgent, strings.TrimPrefix(buildinfo.Version, "v")))