Facebook has the following API –
https://graph.facebook.com/API_VERSION/me?fields=FIELDS&access_token=ACCESS_TOKEN
Does WhatsApp have a similar API where I can get all account information, such as phone number ID and business account ID, by using only the access token and nothing else? I have searched the official documentation and all the APIs I have come across either use the business account ID or the phone number ID to retrieve account information.
I would really appreciate any suggestions provided. Thank you.
2
Answers
No there is no specific API for individual businesses, At least requires a business account ID, refer to this documentation, there are some APIs to access a single phone number and all phone numbers using business account ID.
For Business Solutions Providers (BSPs), If you are then you have to use Embedded Signup for Business Solution Providers,
https://developers.facebook.com/docs/whatsapp/embedded-signup
Yes, it is possible.
Take a look here:
https://developers.facebook.com/docs/whatsapp/embedded-signup/manage-accounts
use the https://graph.facebook.com/v19.0/debug_token route. Add as input_token your accessToken from the response and as Authorization: Bearer Header also the token and your good to go 🙂