Amazon SNS PHP error: GetEndpointAttributes Invalid parameter: EndpointArn Reason: Wrong number of slashes in relative portion of the ARN - amazon-sns

Language: PHP
Amazon SNS function: GetEndpointAttributes
Error:
Invalid parameter: EndpointArn Reason: Wrong number of slashes in relative portion of the ARN
Been trying to figure out what the error is. I've double and triple checked the ARN at Amazon SNS. There is only one ARN listed and the format is similar to:
arn:aws:sns:us-west-1:123456789:mobile_app/APNS_SANDBOX/iOS_Mobile
There is no other ARN listed. Is there something I'm missing?

After researching further, the SNS endpoint ARN is generated by the SNS after the device token is registered with SNS. Thus, it is not known until the device is registered using the device token. Using the returned ARN did not produce the error.

Related

Is it possible to obtain an access_token with expo-auth-session/providers/google?

I am trying to obtain an access token for use with Google APIs using the up-to-date expo-auth-session package.
It works fine to fetch an id_token via useAuthRequest({responseType: "id_token", ...}) or useIdTokenAuthRequest({...})
However, when trying useAuthRequest({responseType: "code", ...}), I get the following error:
[Unhandled promise rejection: Error: The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.]
Does anyone know what is missing from the request? I am using the Expo Go app currently, so I'm not sure if that prevents obtaining an access token. Currently digging through the package's source code...
Add the following two props to useAuthRequest
shouldAutoExchangeCode: false,
clientSecret: 'any_bogus_value!'
shouldAutoExchangeCode will prevent the code from being exchanged and send it back to you in the response.
clientSecret will simply trigger and if check to be true in the providers source code that will avoid that error you specified being returned.
Note that in general it is not a good practice to avoid errors, but in this case, I feel like the error is being shown in error itself!

Bing Translator DNS address could not be found.datamarket.accesscontrol.windows.net

We are using the bing translater api in one of our projects for performing translations. The end point we use to call the api is:
http://api.microsofttranslator.com/v2/Http.svc/Translate?text=
To be able to call the API one has to authorize using the https://datamarket.accesscontrol.windows.net/v2/OAuth2-13.
Sometime in the last few days this datamarket.accesscontrol.windows.net url has become unavailable because the domain name resolution fails.
Exception: System.Net.WebException
Message: The remote name could not be resolved: 'datamarket.accesscontrol.windows.net'
Is anyone else affected by this and know what is going on?
The datamarket domain, and the ability to sign up via the Azure datamarket has been replaced by a regular Azure service.
Visit https://portal.azure.com and sign up for the Microsoft Translator Text API to get an API key. More detailed instructions at http://aka.ms/translatorgettingstarted.

Bad Argument, Invalid Subscription Key when trying to add key from Azure

I am trying to set up my LUIS app in luis.ai (because it seems like I can't set it up in Azure directly?). Anyway, I have created a Language Understanding Intelligent Service (LUIS) (preview) resource, but when I enter one of the keys from that resource into "My Keys" in luis.ai, I get this error: "Bad Argument, Invalid Subscription Key"
Also, I just tried to publish an app with the bootstrap key and got the following errors:
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
As provided in comments, the solution is to use a correct end-point. This is not clear anywhere, but for the luis.ai portal, I have to use WestUS endpoint.
If I change to useing eu.luis.ai, I have to use the WestEU end-point.
To use european LUIS endpoint within Bot Builder C# SDK, just modify Luis Model parameters as follows:
[LuisModel("YOUR-LUIS-APP-ID", "YOUR-LUIS-EUROPEAN-KEY", domain:
"westeurope.api.cognitive.microsoft.com")]
Note that you'll need to export your LUIS app over EU.LUIS in order to access the correct endpoint.
Hope it helps.

Sabre: "UNABLE TO VERIFY MCT" error in PassengerDetailsRQ

Sometimes I noticed I get this error in PassengerDetailsRQ.
UNABLE TO VERIFY MCT FOR SEG 01 AT MAA
I tried calling EndTransaction without passing UpdatedBy Element, then when I again call PassengerDetailsRQ, I got the same error.
What could have gone wrong, or am I missing something ?
Sabre documentation about the error can be found here:
https://formatfinder.sabre.com/Content/AirTravel/ErrorResponsesAirTravel/UNABLETOVERIFYMCTFORSEGXXATXXX.aspx?ItemID=dc63313a21cf43bfa951e0d6deeba124&tabtype=troubleshoot&documentId=dc63313a21cf43bfa951e0d6deeba124_troubleshoot
(Login parameters --> Agent Sign In: your SOAP API Username / Password: your Sabre API Password / PCC: your Sabre API 'Organization')

Invalid Meter Number and Now Authentication Failed

I am using FedEx (Plugin) in nopCommerce.And fill all the Necessary Details.and got error message (meter number in invalid) but when i change the url from https://wsbeta.fedex.com:443/web-services to https://gateway.fedex.com:443/web-services and now new error occur Authentication Failed. I check all the details
Twice.
And when i check admin-> system ->log
and found the the follow Details. Now I Face the problem with Authentication Failed. If u solve this please tell me how.
Log 1:
Log Level : Warning
Short message : Shipping (FedEx). Authentication Failed
Full message:
IP address: 127.0.0.1
Customer:
Page URL:
Referrer URL: /onepagecheckout
Created on: 9/15/2014 12:40:30 PM
Log 2 :
Log Level : Warning
Short message : Resource string (messages.order.product(s).shippingaddress) is not found. Language ID = 1
Full message:
IP address: 127.0.0.1
Customer:
Page URL:
Referrer URL: /onepagecheckout
Created on: 9/15/2014 1:02:52 PM
Thanks
First, make sure that your using your FedEx production credentials (key, password, account, and meter) as your test credentials will not work in their production environment.
Second, try using 'https://ws.fedex.com:443/web-services' instead of 'https://gateway.fedex.com:443/web-services'. From my understanding the 'gateway' endpoint is older.
Third, if your using the FedEx provided WSDL, you'll have to open and modify the endpoint binding located at the bottom on the WSDL file.

Resources