How do I output my SOURCE in these examples.
// Use this code to use a cloud index Coveo.SearchEndpoint.configureCloudEndpoint('ORG');
I want to be able to query on my sources from a public site where the user DOES NOT have to authenticate
This is how I am attempting to get my token:
This is how I am attempting to get my Token.
But this is not working.
It looks like you are trying to request a search token. This is really only ever done in backend code, including credentials with the rights to generate search tokens in an html page sent to the client kinda defeats the whole purpose of search tokens.
If you need to implement anonymous search on top of a Cloud organization your best bet is to create an API key that can only execute queries and then include this token into your page. But using a search token is probably a better practice, so if you have access to running code in some kind of backend the best way would be to have the logic for generating the search token done there and then put only the resulting token in the generated HTML.