ejabberd 21.12 Unable to use API from Other Domain - api

I can call register API from postman DomainURL.com:5280/api/register its working fine. but when I try to use same API using CURL in PHP with other domain its not working. Please check below links
http://prntscr.com/itZhufVlPtds
http://prntscr.com/RpAM_G1cFvlC
Please Help Thanks

Related

How to call Bitrix24's API using Postman?

I researched on google and I'm stuck while I try to find out Bitrix24 API docs for users using PostMan. Is there an available resource that could help me solve my trouble? , I hope I could retrieve a document or some things like this. Thanks for reading <3
Try this endpoint on your postman
https://example.bitrix24.id/rest/crm.product.list
This is for the CRM Product List
https://training.bitrix24.com/rest_help/crm/products/crm_product_list.php
if this dosent work you can put .json
https://example.bitrix24.id/rest/crm.product.list.json
for the authentication you can go to Developer Resources - Other - Local Application
and put Postman callback on the Handler (https://oauth.pstmn.io/v1/callback).
dont forget to click the Script Only.

Where can i find valid webapp endpoint in Whatsapp Business API integration

I am new in whatsapp business API integration and i successfully installed Docker and postman collection.
Referring below link : https://developers.facebook.com/docs/whatsapp/installation/dev-single-instance
Now in postman collection they mentioned regarding {{ URL }}
Collection Link : https://developers.facebook.com/docs/whatsapp/guides/postman
The first thing you should replace is the URL which represents the webapp endpoint. You'll see that all of the requests will reference this variable via {{URL}} so it's important you get this right.
How can i get this Valid URL ?
I tried hard but unable to find it.
Help me if anybody know this.
Thanks in advance.
If you have deployed whatsApp business API over docker setup .. then your endpoint url will be https://localhost:9090 .. replace "localhost" with ip of server if required.
Simply, use command netstat -nltp|grep 9090, and check on which ip the port is open for.

Chef API getting 401 Unauthorized error chef

Always getting 401 unauthorized error when I am trying to get the response from Chef API . I am giving the correct header values for Basic Authentication and Accept. I am trying to get the response with the help of Java Rest Template. Could you please anyone help on this..
Chef doesn't use Basic auth for API access so not sure what you think you're setting that to. https://docs.chef.io/auth.html#authentication-headers shows the official authentication spec. I would recommend using jclouds-chef for API access from Java, though unfortunately its docs are rather sparse.

Error: redirect_uri_mismatch while trying to get access_token using oauth

I am trying to get access_token using the instructions here developers.google.com/accounts/docs/OAuth2InstalledApp (which I have followed very diligently) but keep hitting the redirect_uri_mismatch error. What am I doing wrong?
First I create a installed app/other using the console (
Client ID for native application
Client ID ...
Client secret ...
Redirect URIs
urn:ietf:wg:oauth:2.0:oob
local host url
Got the authorization code successfully using the browser using
https://
accounts.google.com/o/oauth2/auth?client_id=818722811109-8ak0a1l3ooqqt3bd97bktr33ghenlptk.apps.googleusercontent.com&redirect_uri=http://:51551/Callback&response_type=code&scope=https://www.googleapis.com/auth/adexchange.seller.readonly&access_type=offline
curl -d "code=...&client_id=...&client_secret=...&grant_type=authorization_code&redirect_uri=urn:ietf:wg:oauth:2.0:oob" -X POST https://
accounts.google.com/o/oauth2/token
gives me error "redirect_uri_mismatch"
I'm at a loss what I am doing wrong. I use the redirect_uri from the console which is for the non-domain one, but can't get past this error.
Any pointers would be appreciated.
Thanks.
http://:51551/Callback is not a valid redirect_uri, so the link you mentioned can not get authorization code. So I doubt that the authorization code you get in this way.
Use this one:
https://accounts.google.com/o/oauth2/auth?client_id=818722811109-8ak0a1l3ooqqt3bd97bktr33ghenlptk.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/adexchange.seller.readonly&access_type=offline
Sorry the problem is not in code. stackoverflow does not allow localhost in urls, hence I had to delete that domain to get the post to go through. The code works fine after clicking the accept button I do see the code= in the redirect url in localhost.
The problem is in the curl POST.

How to generate api.dfp.refreshToken?

I'm just getting started using Google's DFP API using their java libraries. And it seems step 1 is to get a login to use the API. Their examples/docs strongly suggest I should use OAuth2 for this purpose, however I can't get it to work.
I've gotten my api.dfp.clientId & api.dfp.clientSecret from https://code.google.com/apis/console#access and I'm running GetRefreshToken to try to get my api.dfp.refreshToken but it doesn't work. Specifically when I use the URL given by GetRefreshToken to generate the token I get an error that says:
"Error: redirect_uri_mismatch
The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob did not match a registered redirect URI"
Any ideas what is wrong? I'm completely stuck at this point. Perhaps I should be using something other than OAuth2?
Thanks,
-Dave
You have to supply a redirect URI along with the oath request. The URI that is passed must match the one you specified in the console (https://code.google.com/apis/console#access)
I think you created a Web Application in Cloud Console. Instead -
try create a native application. This will change the behavior of the REDIRECT URI-fields, and set them to urn:ietf:wg:oauth:2.0:oob and localhost.