Quicksight embedded URL not working for users other than those generating it

I am generating an embed url for QuickSight for Anonymous user. I am not consuming that url on my side. I gave the url to my friend immediately and he paste’s it in his browser. He is not able to view the Dashboard and the following message is shown Embedding failed because of invalid URL or authorization code. Both of these must be valid and the authorization code must not be expired for embedding to work. Now if I paste that URL in my browser I am able to see it. How is it happening that my friend is not able to see it. How can I make it possible to open the URL on my friend’s browser

Note: Just to make it clear, I am generating the embedded url using Ruby SDK, and after it is generated, I copy the URL and send it to my friend using email. I am not consuming it in any way.

I believe this is because it is already used by you.