# The share link isn't working!

**URL:** https://community.w2g.tv/t/the-share-link-isnt-working/165094
**Category:** Bugs
**Created:** [September 15, 2021, 9:29am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094 "2021-09-15T09:29:36Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 15, 2021, 9:29am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/1 "2021-09-15T09:29:37Z")

</div>

The share link which governs which video to play is not working! I have verified tons of times and am sure that the error is not on my side. Waiting for response!

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 15, 2021, 10:05am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/2 "2021-09-15T10:05:52Z")

</div>

It seems to work fine for me. Can you provide an example link which is not working for you?

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 15, 2021, 10:09am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/3 "2021-09-15T10:09:00Z")

</div>

I’m using user data to input the value in. That doesn’t seem to work. So I hard coded it to see wheather the problem was on my end and itstill didn’t work. Here is the example link. [The Kid LAROI, Justin Bieber - STAY (Official Video) - YouTube](https://www.youtube.com/watch?v=kTJczUoc26U)

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 15, 2021, 10:20am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/4 "2021-09-15T10:20:43Z")

</div>

That video plays fine for me. Which browser and operating system are you using?

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 15, 2021, 10:25am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/5 "2021-09-15T10:25:46Z")

</div>

Chrome & Windows. This also doesn’t play for my colleague. It’s not as if there’s something blank there. There is always something there but not what we put the `share` variable. It’s always an animated movie of sorts. A few tries earlier it was LLama Drama(what even is that XD), and sometimes it was an animated movie named something from ‘C’ I don’t know. Do you know what error I’m facing?. When I try to view the content of `share` I get a `Key Error` that it doesn’t exist. That’s also something even tho it’s declared bright and clear. I have tried several ways to bypass it like writing user input onto a file and then reading from it and storing the value in `share`, still it’s the same thing. I still get the `Key Error`. Any help?

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 15, 2021, 10:47am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/6 "2021-09-15T10:47:18Z")

</div>

Ahhh okay… you are using the API? Now i get it. I assume you read this? [Watch2Gether API Documentation](https://community.w2g.tv/t/watch2gether-api-documentation/133767)

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 15, 2021, 11:05am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/7 "2021-09-15T11:05:44Z")

</div>

Yes, yes I did. Please provide me with a solution if you can!

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 15, 2021, 12:42pm UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/8 "2021-09-15T12:42:32Z")

</div>

Do you have some sample code. It’s really hard to say whats going on without seeing your code.

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 16, 2021, 9:54am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/10 "2021-09-16T09:54:29Z")

</div>

I guess you have to remove the quotes around the variable names in your “data” object. Or is this just pseudocode?

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 16, 2021, 10:26am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/11 "2021-09-16T10:26:01Z")

</div>

That’s just pseudo-code , still I edited it to yourr needs 🙂

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 16, 2021, 10:32am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/12 "2021-09-16T10:32:05Z")

</div>

Okay, what is the return code you get from the API?

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 17, 2021, 9:03am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/13 "2021-09-17T09:03:15Z")

</div>

Nothing atm. As I said, the API is working fine, just that it isn’t displaying the video we asked for. That’s why the API isn’t returning any error messages or error codes. Sorry for the late response!

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 17, 2021, 9:18am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/14 "2021-09-17T09:18:27Z")

</div>

I see. Is the background color being set correctly? Please be aware, that the video you set is only loaded when the room is opened for the first time.

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 17, 2021, 9:44am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/15 "2021-09-17T09:44:25Z")

</div>

Weird, the bg color isn’t being displayed either. It’s just white each time.

Could you explain the point below in detail?

> Please be aware, that the video you set is only loaded when the room is opened for the first time.

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 18, 2021, 4:04pm UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/16 "2021-09-18T16:04:13Z")

</div>

So, what’s the status quo?

---

<div class="post-metadata">

### Author: ![user\_95f53b7185f71fb](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_95f53b7185f71fb/32/73388_2.png) [@user\_95f53b7185f71fb](https://community.w2g.tv/u/user_95f53b7185f71fb)
#### Post date: [September 18, 2021, 6:17pm UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/17 "2021-09-18T18:17:11Z")

</div>

Since the background color is not set either, it seems like your JSON body is not properly formatted and therefore ignored. As you can see in the Javascript examples ([Watch2Gether API Documentation](https://community.w2g.tv/t/watch2gether-api-documentation/133767)) the settings object is converted to JSON by calling JSON.stringify. You need to adapt that in your code as well. Does that help?

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 19, 2021, 11:21am UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/18 "2021-09-19T11:21:13Z")

</div>

Ohhh, I’ll do that and inform you.

---

<div class="post-metadata">

### Author: ![user\_603ed83a76ba453](https://w2g-community.b-cdn.net/user_avatar/community.w2g.tv/user_603ed83a76ba453/32/23591_2.png) [@user\_603ed83a76ba453](https://community.w2g.tv/u/user_603ed83a76ba453)
#### Post date: [September 19, 2021, 4:25pm UTC](https://community.w2g.tv/t/the-share-link-isnt-working/165094/19 "2021-09-19T16:25:49Z")

</div>

Yessssss its working. Not because of not `stringifying` the code, the reason was something arbitrary. Sorry for doubting the API’s proficiency, its working great! And yeah, I’ve proudly developed Discord Bot with this XD
