Posts tagged with postman

i test like facebook post request in graph facebook api. i use my access token and i have a post_id, this endpoint is:"http://graph.facebook.com/{post_id}/likes". when i send this request then post have a post_id was liked. I did the same thing on postman (endpoint:https://graph.facebook.com/v19.0/{post_id}/likes) and passed in the parameter Authorization:{access_token} but it failed and returned 400 bad request: "error": { "message": "(#3) Publishing likes through the API is only available for page access tokens", "type": "OAuthException", "code": 3, "fbtrace_id": "AU3wMLbb67rRXR4mgF-4FoX" }

I hope that there is someone who has been like me and has solved this problem to share with me the documents to solve it.

I created new credentials in Google Developer Console for Google Ads base URL : https://googleads.googleapis.com/v14/customers. and added the scope: https://www.googleapis.com/auth/adwords . Using Oauth2 user consent. https://developers.google.com/identity/protocols/oauth2

In Postman, I performed the following steps in my Google Ads workspace :

1a. Added Client Id and Client Secret to the variables portion of the Google Ads collection.

  1. Set the token name
  2. Set the grant type = 'Authorization Code'
  3. Callback URL = https://oauth.pstmn.io/v1/browser-callback
  4. Auth URL = https://accounts.google.com/o/oauth2/v2/auth
  5. Access Token URL = https://oauth2.googleapis.com/token
  6. Scope = https://www.googleapis.com/auth/adwords
  7. Refresh token (default) = https://oauth2.googleapis.com/token

When I click the Access New Token button, I get the redirect page requesting me to choose an account. So I choose my google account and allow oauth.pstmn.io to access my google account (This is postman browser) .

The token generation fails with the message below (note that I have already successfully done token generation in Postman with credentials used for DFA Reporting for Campaigns, Sites, and Ads in GCM 360):

However, the result is that I get an "invalid client". How could that be since I created the client in Google Developer Console and copied those over to Postman doing everything that I did successfully for GCM 360 APIs ? Thanks. Here are the slides:

Google Sensitive scopes List

Postman Redirect

Postman Error Logs

Response body (in error log)

I am trying to create a template from postman by sending this object:

{     "name": "listado_productos",     "language": "es",     "category": "TRANSACTIONAL",     "components": [         {             "type" : "HEADER",             "format": "document",             "example": {                 "header_handle": [                     "https://drive.google.com/file/d/1CcTpDZL3p0ltMFhIKU9Vhz1LWG0bQFpN/view?usp=share_link"                 ]}         },         {             "type": "BODY",             "text": "Buenas tardes, acá le enviamos el nuevo listado de precios. Muchas gracias"         },         {             "type": "FOOTER",             "text": "ABS."         }     ] } 

If I try an example from the official business-management-api guide, it also rejects it for non-compliance with terms and conditions.

"name": "promotional_message",   "language": "en_US",   "category": "TRANSACTIONAL",   "components": [{            "type":"BODY",            "text":"Hi {{1}}, get an extra 10% off every order above $300.",            "example":{"body_text":[["Sonia"]]}          },          {            "type":"HEADER",            "format":"TEXT",            "text": "Bonus Tuesday starts now!"          },          {            "type":"FOOTER",            "text":"Not interested? Tap Stop promotions"          },          {            "type":"BUTTONS",            "buttons":[{"type":"QUICK_REPLY", "text": "Shop now"},             {"type":"QUICK_REPLY", "text": "Stop promotions"}]          }]   

The response is that it is rejected for being duplicate or not complying with WhatsApp Busiess Api terms and services but it is not true, I read the terms and conditions and the file / message format complies. Does anyone identify the problem?

I'm trying to upload an image as profile picture using WhatsApp Cloud API *.

After creating an application using WhatsApp Cloud API I'm not allowed to access neither using the regular application nor using Business Application. It says something like "try again in one hour". So I have to implement everything using the API.

After reading the docs and importing Postman Endpoints I found the one called Business Profiles > Update Business Profile

https://graph.facebook.com/{{Version}}/{{Phone-Number-ID}}/whatsapp_business_profile

It has a field "profile_picture_url"and I have tried POSTing media https://graph.facebook.com/{{Version}}/{{Phone-Number-ID}}/media and then with the given ID y used https://graph.facebook.com/{{Version}}/{{Media-ID}} to get the URL but it didn't work. The rest of the information is updated successfully

{     "messaging_product": "whatsapp",     "address": "",     "description": "Simple Bot",     "email": "...@gmail.com",     "websites": [         "https://..."     ],     "profile_picture_url": "https://lookaside.fbsbx.com/..." } 

However if I try to send someone using the ID and the endpoint https://graph.facebook.com/{{Version}}/{{Phone-Number-ID}}/messages it works fine. And if I use Download Media Content with the URL in Postman it works fine too.

I don't know if I have misunderstood something or if it can't be done using the API.

I have deployed a multiconnect setup of the WhatsApp Business API client in Production Kubernetes enviroment, using the documentation for Minikube Developer Setup: Multiconnect on Minikube as referece.

But when doing the first login, in order to get the auth token, i get the following error on Postman:

{     "meta": {         "version": "v2.37.1",         "api_status": "stable"     },     "errors": [         {             "code": 1006,             "title": "Resource not found",             "details": "URL path not found"         }     ] } 

All the containers are running:

NAME                                           READY   STATUS      RESTARTS   AGE mysql-dev-6cdc47979f-6f6t5                     1/1     Running     0          2d23h whatsapp-coreapp-deployment-7bb4c6b8bc-qw946   1/1     Running     0          24m whatsapp-coreapp-deployment-7bb4c6b8bc-zkj5z   1/1     Running     0          24m whatsapp-master-deployment-84ffbdd48d-4rw8w    1/1     Running     0          24m whatsapp-master-deployment-84ffbdd48d-zwvlq    1/1     Running     0          24m whatsapp-web-deployment-74b99f4579-s44lp       1/1     Running     1          25m whatsapp-web-deployment-74b99f4579-sn55t       1/1     Running     0          25m 

And the given error happens on every call on Postman, not only when logging in (check health, get users, login, login admin, etc), all of them gives the same error:

"code": 1006, "title": "Resource not found", "details": "URL path not found" 

I've checked the container logs and i'ts returning 404 for every path called:

[2021-12-20 12:40:57.546610] app.INFO: [dd610cd0d21e431fafafc737c323565e] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-20 12:40:57.548893] app.INFO: [dd610cd0d21e431fafafc737c323565e] Request POST_//v1/users/login returns 404 in 530.65 ms [] [] [2021-12-20 12:45:18.556704] app.ERROR: [4018a09ea0084f9fa82f843905de2b00] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET //v1/stats/app" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET //v1/stats/app\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"//v1/stats/app\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-20 12:45:18.557154] app.INFO: [4018a09ea0084f9fa82f843905de2b00] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-20 12:45:18.557462] app.INFO: [4018a09ea0084f9fa82f843905de2b00] Request GET_//v1/stats/app returns 404 in 84.57 ms [] [] [2021-12-20 12:52:11.890507] app.ERROR: [5a84217237cc49e8bb9df953ac32c799] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /auth/v1/login/" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /auth/v1/login/\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/auth/v1/login/\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-20 12:52:11.890825] app.INFO: [5a84217237cc49e8bb9df953ac32c799] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-20 12:52:11.891043] app.INFO: [5a84217237cc49e8bb9df953ac32c799] Request GET_/auth/v1/login/ returns 404 in 84.07 ms [] [] [2021-12-20 12:52:12.088612] app.ERROR: [2b26c43f700640f190977bb797ec4448] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /favicon.ico" (from "https://192.168.88.80:31599/auth/v1/login/") (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /favicon.ico\" (from \"https://192.168.88.80:31599/auth/v1/login/\") at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/favicon.ico\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-20 12:52:12.088863] app.INFO: [2b26c43f700640f190977bb797ec4448] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-20 12:52:12.089117] app.INFO: [2b26c43f700640f190977bb797ec4448] Request GET_/favicon.ico returns 404 in 82.22 ms [] [] 

Edit: Here's also the logs for the second replica of the webapp deployment

Web server started Starting web monitor loop ... ==> /var/log/lighttpd/error.log <== 2021-12-20 12:38:05: (server.c.1488) server started (lighttpd/1.4.55) tail: cannot open '/var/log/whatsapp/web.log' for reading: No such file or directory Setting up watches. Watches established. tail: '/var/log/whatsapp/web.log' has appeared;  following new file [2021-12-20 12:52:24.295383] app.ERROR: [7c73b15c0a6c488fb5ac7703a4b337ec] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /teste/" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /teste/\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/teste/\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-20 12:52:24.302930] app.INFO: [7c73b15c0a6c488fb5ac7703a4b337ec] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-20 12:52:24.307525] app.INFO: [7c73b15c0a6c488fb5ac7703a4b337ec] Request GET_/teste/ returns 404 in 201.72 ms [] [] [2021-12-21 11:04:28.642518] app.ERROR: [7181dfea9e7b4e51adb41fc41571253f] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "POST //v1/users/login" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"POST //v1/users/login\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"//v1/users/login\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-21 11:04:28.644938] app.INFO: [7181dfea9e7b4e51adb41fc41571253f] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-21 11:04:28.645501] app.INFO: [7181dfea9e7b4e51adb41fc41571253f] Request POST_//v1/users/login returns 404 in 87.15 ms [] [] [2021-12-21 11:05:29.180215] app.ERROR: [8ce236970e404d7b90d86ad53e774105] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /auth/v1/login/" (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /auth/v1/login/\" at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/auth/v1/login/\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-21 11:05:29.180746] app.INFO: [8ce236970e404d7b90d86ad53e774105] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-21 11:05:29.181257] app.INFO: [8ce236970e404d7b90d86ad53e774105] Request GET_/auth/v1/login/ returns 404 in 26.28 ms [] [] [2021-12-21 11:05:29.332427] app.ERROR: [feb8c3253624422383421e253fc8ce73] Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /favicon.ico" (from "https://192.168.88.80:31599/auth/v1/login/") (uncaught exception) at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php line 2 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): No route found for \"GET /favicon.ico\" (from \"https://192.168.88.80:31599/auth/v1/login/\") at /var/www/html/vendor/symfony/http-kernel/EventListener/RouterListener.php:2, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code: 0): No routes found for \"/favicon.ico\". at /var/www/html/vendor/symfony/routing/Matcher/UrlMatcher.php:2)"} [] [2021-12-21 11:05:29.332971] app.INFO: [feb8c3253624422383421e253fc8ce73] Response:  {"meta":{"version":"v2.37.1","api_status":"stable"},"errors":[{"code":1006,"title":"Resource not found","details":"URL path not found"}]} [] [2021-12-21 11:05:29.333465] app.INFO: [feb8c3253624422383421e253fc8ce73] Request GET_/favicon.ico returns 404 in 21.29 ms [] [] 

And here is the service that got created for webapp:

NAME                       TYPE           CLUSTER-IP      EXTERNAL-IP      PORT(S)                               AGE whatsapp-web-service       NodePort       10.110.67.166   <none>           443:31599/TCP                         22h 

What could this be?