Error in Oauth2 process: No 'Access-Control-Allow-Origin' header is present on the requested resource - sonos

I've been having a bit of trouble with receiving a code from the Sonos API for my application to then get a token for later API requests, specifically the error above. Is there any sort of test code or option to temporarily skip Oauth2 to test the API requests I already have written? Thanks!

If there was that would be a bit of a gigantic security hole. Just fix your auth code.

Related

Apache nifi getTwitter Processor returning 403 forbidden

I want to use Apache Nifi to track real time tweets
i pasted in my keys correctly but all requests return this error :
19:15:20 UTC ERROR
GetTwitter[id=59b5cb18-017e-1000-a6a2-991a653ec138] Received error HTTP_ERROR: HTTP/1.1 403 Forbidden. Will attempt to reconnect
i dont know where the problem is from.
thank you.
403 Forbidden means the Twitter API is rejecting your request - your access keys could be incorrect, or you might not have the right access rights for the endpoint you're accessing.
The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
Check that your developer account includes access to the endpoint you’re trying to use. You may also need to get your App allowlisted (e.g. Engagement API or Ads API) or sign up for access.
From https://developer.twitter.com/en/support/twitter-api/error-troubleshooting
Make sure you follow the advice from Twitter here and make note of:
With Essential access, you are only able to make requests to the Twitter API v2 endpoints, and not the v1.1 or enterprise endpoints. You are limited to 500K Tweets/month, and unable to take advantage of certain developer portal functionality such as teams and access to additional App environments
There are limits on what you can do with the Essential access level. See here.
If that doesn't help - please include a screenshot of your GetTwitter config and your version of NiFi.
If it raises 403 error while using GetTwitter processor in nifi.
API Key & consumer key aren't only a problem. Change the Twitter endpoint field while configuring the GetTwitter processor from
Filter Endpoint
to
Firehose Endpoint
In the field of twitter endpoint
Probably this will work!!

Use AJAX to GET smart_collections.json

Within a Shopify store I am making several AJAX calls and only one returns a 401 Unauthorized. The AJAX url is https://{{key}}:{{password}}#stand-around-creations.myshopify.com/admin/smart_collections.json?limit=250&fields=id,title,handle,image and it returns this:
XMLHttpRequest cannot load https://stand-around-creations.myshopify.com/admin/smart_collections.json?limit=250&fields=id,title,handle,image.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://stand-around-creations.myshopify.com' is therefore not allowed access. The response had HTTP status code 401.
I am using a private app with read access only for products, variants and collections. I know this is an authentication issue but how to solve to me isnt really clear. I have never used Basic Auth, OAuth or OAuth 2 and only have a very basic understanding of the concept. I tried searching the Shopify forums for a solution but couldn't find a solution. So how can I solve this issue or what am I doing wrong?

Occasionally 401 Unauthorized Google Cloud Message

While using Google Cloud Message API I occasionally get 401 Unauthorized status. So, sometimes my push notifications are send and sometimes not, without changing anything in the API request.
I use curl request with server key.
I tried to specify IPs list and set it to "Any IP allowed".
I already tried to create new server keys and projects, as some people here tell it helps them in similar situation. Sadly, it not helps me.
I'm seeing a similar problem with other Google Cloud APIs and I suspect it's related to your authentication being expired. Make sure to refresh any tokens you are using.

Yammer Downloading with access token unresponsive, issues 401 forbidden?

Hey guys I ran into a weird issue with trying to use the Yammer API's Download URL.
Since this is an API call, you would think that you could just append your users
access token to the end of the API URI to initiate a direct download of the file,
but it seems that this will lead to a 401 Unauthorized when trying to actually use it?
My api urls are set up as so
https://www.yammer.com/domain.com/api/v1/uploaded_files/{file_number}/version/{version_number}/download/somepdf.pdf?access_token={access_token}
Does anyone know why this does not work?
?access_token={access_token} will not work the token should be in the http header and not the url after authentication.
If you are trying to access Yammer programmatically from an application be aware of the following:
Around December 2013 Yammer has slightly modified the authentication process.
By then the access_token could be part of the URL as described in the question.
Calling the API with the old code results in a HTTP 401 error. By now it is important to transport a Bearer Token in the HTTP Request like this:
GET /api/v1/messages/following.json HTTP/1.1
Host: www.yammer.com
Authorization: Bearer abcDefGhi
abcDefGhi is the token gathered after the oauth authorization.
Source:
http://developer.yammer.com/authentication/

OAuth and Dropbox api

I'm trying to use the API dropbox.
Once the authentication window is opened, a message is displayed:
This session has expired. Please return to the app to try again.
See full image
I'm using a library to work with OAuth called jsOAuth
Console Error
See full image
I published this application: Here the full code
Notes
I know that is not very safe to use OAuth with Javascript, but this is only for studying the OAuth standard.
See here the complete JS
Any example of using javascript with OAuth will help me a lot
Thank you all for your help!
That error message means the request token used for that authentication session is no longer valid, likely because a timeout has passed. (The request token is only good for a certain amount of time.) You need to start over with a new request token.