Error : Something went wrong while trying to create board without registration

  • 10 February 2022
  • 0 replies
  • 29 views

Hi,

I am getting “something went wrong” error while trying to create board without registration

I have checked on console panel - following api giving 500 status
picker.acb5f7a4434c0a85.js:2 POST https://miro.com/api/v1/anonymous-boards/ this api giving 500. I am passing appropriate Jwt token also. Can you check this?

i have enable following feature

Based on your request we have enabled your access to boards-picker (2) and editable boards without registration (3).

 


Below Api fails


Client code
async function getMiroPresentationIframeLink() {
const pos = { left: 0, top: 0 };
const size = { width: 500, height: 500 };

const windowRef = window.open(
'',
'_blank',
`width=${size.width},height=${size.height},left=${pos.left},top=${pos.top},menubar=0,toolbar=0,location=0,personalbar=0,status=0`,
);

const script = document.createElement('script');
script.src = 'https://miro.com/app/static/boardsPicker.1.0.js';
document.body.appendChild(script);
script.onload = () => {
miroBoardsPicker.open({
windowRef: windowRef,
clientId: 'clientId', // actual client id
action: 'access-link',
allowCreateAnonymousBoards: true,
getToken: () => getTokenFromServer(),
success: data => {
if (data?.accessLink) {
saveAndBroadcastChannelPlugin(data.accessLink);
}
},
error: e => {
console.log('on Miro Board error', e);
},
});
};
}

const getTokenFromServer = () => {
//Get JWT token from your server. Read more about JWT https://jwt.io/
return api.integration.getMiroIntegrationToken().then(response => {
return response.data;
});
};




---------------------------------------------

server code

code:

return JWT.create()        .withIssuer("actual client id")        .withExpiresAt(new Date(System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(5)))        .sign(Algorithm.HMAC256("actual client secret"));

0 replies

No replies yet...

Reply