Partner Zone

'https://api.myob.com/accountright' from origin 'http://localhost:8080' has been blocked by CORS policy

1 REPLY 1
Hannah_B
MYOB Moderator
124 Posts
MYOB Moderator
Australia
MYOB Moderator

124Posts

27Kudos

25Solutions

Re: 'https://api.myob.com/accountright' from origin 'http://localhost:8080' has been blocked by CORS policy

@caremeninfo

 

Thanks for reaching out, I am not overly familiar with the Cors policy however from what I've found online this seems to be a Javascript error that occurs when the Same Origin Policy is preventing the response form from being received.

 

To resolve this you would need to return CORS headers in your response.

 

CORS - https://developer.mozilla.org/en-US/docs/Glossary/CORS
CORS errors - https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors

 

If you have any questions you can create a support request with us HERE.


Thanks,
@Hannah_B


MYOB API Specialist


MYOB API Support Centre|MYOB App Marketplace|MYOB AccountRight API Endpoint Doc's



Did my answer help?


Mark it as a Solution

caremeninfo
1 Post
User

1Posts

0Kudos

0Solutions

'https://api.myob.com/accountright' from origin 'http://localhost:8080' has been blocked by CORS policy

I'm tring to request company files via the following endpoint from localhost

https://api.myob.com/accountright/

 however, it always comes back with CORS error

Access to XMLHttpRequest at 'https://api.myob.com/accountright' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resourc

 

By the way, I've already successfully get the access_token and refresh_token from the https://secure.myob.com/oauth2/v1/authorize/

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post