Mailchimp Oauth2 sample app troubleshooting - php

I keep getting the following error when I try to use the Mailchimp OAUTH2 sample app (PHP).
For your reference, here's their github repo: https://github.com/mailchimp/OAuth2-sample-apps
However, my client id and client secret are correct (have copied and pasted them multiple times).
Complete Failure!: redirect_uri_mismatch
This likely means that you have entered a bad client_id or client_secret or you are being awesome and checking to see this failure occur.
Try Again?
If it helps, I'm using the Yii 2 framework.

Related

Get statistics on sent messages with Firebase Admin SDK for PHP

I want to get statistics on sent messages. Found this method in the documentation, but the request was unsuccessful. Requires authentication.
My team uses the Firebase Admin SDK for PHP to send messages. I tried to find this method in the documentation, but did not find it.
Do have Firebase Admin SDK for the PHP method to get statistics, maybe I just missed it?
Or probably can I authorize with Firebase Admin SDK for PHP, and send GET https://fcmdata.googleapis.com/v1beta1/{parent=projects/*/androidApps/*}/deliveryData ?
It looks like the SDK you're using does not wrap the Google Analytics 4 Data API that you linked. There's nothing we can do here about it, so I recommend either filing a feature request on the repo of that SDK, or (even better) filing a pull request that adds the feature. :)

MyPOS Payment Gateway integration with PHP Laravel via API (Not SDK)

I am trying to implement myPOS (https://www.mypos.eu/) with PHP with API and flutter.
Basically I want to strike API call by the Laravel from flutter app to MYPOS gateway.
I have gone through the official documents with this link. The OAuth API as per this link implemented with PHP but not able to get the results.
I have created the developer account, added the client_id, client_secrets at the required place, followed all the given steps in official document, but still not able to get the required and expected results.
It seems, at some point, the official document is missing some steps with example for the implementation.
It would be great if one can provide an example.

Error 500 in Symfony when trying to use Auth0

I did download the example that appears in the auth0 (https://auth0.com/docs/quickstart/backend/php-symfony) , enter the customer id and the secret id gives api that i use as it appears in the tutorial , when I try to access the http://localhost:8000/api/ping that is protected by the Auth0 is giving me this error Signature verification failed, already did this to someone ? What am I doing wrong?
Error Image
Log Image
Your API is likely using a different client_secret than the one used to issue the token. Make sure it is properly configured her: https://auth0.com/docs/quickstart/backend/php-symfony#3-configure-your-auth0-app-data
The secret in the API must be the same configured in the API dashboard on Auth0 (Dashboard > APIs > {your API} > Settings). Look for "signing secret".
Then click on the "Test" tab on our API definition. You'll see a test token available there. Make the same Postman call with that token and it should work.
PS: looking at the tutorial, I think it needs to be updated (not architecturally, but rather in the configuration. I the SDK & docs team aware.

Google Adwords API "An error has occurred: { "error" : "invalid_grant" }"

I've been crawling the internet all morning trying to figure this out. I'm trying to get access to a Adwords test account through the API but I keep receiving "An error has occurred: { "error" : "invalid_grant" }". I've seen this is quite a common problem so perhaps if I outline what I've done step by step someone can correct me. Hopefully!
Created a Google adwords account and set up a campaign.
Created a MCC account. Added Google adwords account and applied for API access (pending). Noted API key, client id for auth.ini.
Created a test MCC account and added Google adwords account. Noted client id for auth.ini.
Using the Google account of both MCC accounts went into the API console and created a new installed application app. Noted all keys/tokens.
Downloaded the PHP code examples and libs. Ran get GetRefreshToken.php, granted accesses to app(s) and noted refresh token for auth.ini
Set up auth.ini populating developerToken, userAgent, clientCustomerId, client_id, client_secret and refresh_token.
Now I've tried using BOTH sets of tokens and ids from the test MCC account API console and the live MCC account API console. Both give me the same error. I've tried regenerating all tokens several times.
Gave up and came crawling to StackOverFlow.
Is the invalid_grant message related to Auth or my developerToken token not being activated yet (sure it said I could use my test account though) or because I haven't set up any of the billing?
In my case the problem was at step 5 in your list; I had copied the authorization code from my browser after granting access, rather than the refresh token generated by GetRefreshToken.php after I pasted the authorization code there.
I had the same situation for a long time.
But solution was very simple.
The code getting after authorizing the Google is not your refresh token.Its is only an access token(I guess.)
You have to add this code to GetAccessToken's $code variable function in getrefreshtoken.php file and it will return the actual Refresh token.
This solved my issue.
It is very important to note that the SDK is designed to be used through PHP-Cli. So please don't use it via browser. If you still run it by commenting out return line you'll get into further problems to comment that on each file :)

Adwords API Bad Authentication

I am using Adwords API from last 3 months and all of a sudden today it is coming up with error message as follows:
Uncaught exception 'AuthTokenException' with message 'Failed to get authToken. Reason: BadAuthentication'
I am using google adwords V201101 php library with auth.ini containing all user details and settings.ini with https://adwords.google.com not sandbox environment. Can anyone help me with this please???
Thanks,
Murali.
you may requesting authToken from ClientLogin service too many times, that is way you get 'CaptchaRequired'.
Request authToken just for the first time, and then cache it for subsequent requests.
Check this out http://goo.gl/TOX6N
I recently had this problem trying to connect to Google DFP. I copied perfectly working code from my localhost after development and ran it on my remote cloud server. I then received the
Failed to get authToken
message. The reason was that google was blocking the attempted login as a security measure because it was a new location. I had to log into the google account (from the web) with those credentials in order to see the message and confirm the added login location. Everything worked fine after that authorization.
I've stumbled across this question and thought that this info may help someone else.
BadAuthentication means your username/password is incorrect. May be someone changed the account password, may be auth.ini got modified by mistake.
See detailed error codes here: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html#Errors
Cheers,
Anash
I started getting this error after somebody in my organization updated the password for the account my app was using to log in. The best way to avoid this happening again is to use OAuth2.
It's as easy as going to the Google API console and creating a Client ID for Installed Applications (under API access) for your project. You then use the Client ID and Client Secret in your Adwords API auth.ini file.
Next you run the examples/AdWords/Auth/GetRefreshToken.php script which will have you grant your app access to your Adwords account. You'll end up with a Refresh Token which you need to add to your auth.ini.
The ClientLogin (username and password) method of authentication is being deprecated in favour of the above so best to migrate ASAP.

Categories