heyoo icon indicating copy to clipboard operation
heyoo copied to clipboard

error invalid access token

Open Hendroarifin opened this issue 2 years ago • 2 comments

{'error': {'message': 'Invalid OAuth access token - Cannot parse access token', 'type': 'OAuthException', 'code': 190, 'fbtrace_id':

help me please

Hendroarifin avatar Jun 20 '22 06:06 Hendroarifin

I'm also getting same error. API Key is working absolutely fine in Postman, but with python script of heyoo getting this error.

daudcle avatar Jul 22 '22 12:07 daudcle

Hi, @daudcle @Hendroarifin Were you able to resolve this?

This is due to the fact the TOKEN and PHONE_NUMBER_ID on your local have issues or don't really match with ones in the Facebook developer portal.

If you're using .env don't forget to load_dotenv() and also make sure you're running your script in the same directory with your .env, This should be able to fix it.

Kalebu avatar Aug 14 '22 12:08 Kalebu

Hi, @daudcle @Hendroarifin Were you able to resolve this?

This is due to the fact the TOKEN and PHONE_NUMBER_ID on your local have issues or don't really match with ones in the Facebook developer portal.

If you're using .env don't forget to load_dotenv() and also make sure you're running your script in the same directory with your .env, This should be able to fix it.

I am facing the same issue. Below is error.

{'error': {'message': '(#131000) Generic error', 'type': 'OAuthException', 'code': 131000, 'error_data': {'messaging_product': 'whatsapp', 'details': 'An unknown error occurred'}, 'fbtrace_id': 'A71GMk0x3Z8ngpI1HNsz6aH'}}

PS: i am not using env variables. I am directly copy pating token and phone number id. Postman working good. I am receiving message.

golucoder avatar Aug 22 '22 17:08 golucoder

Hi @golucoder, What you're facing is not an Authentication issue or something to do with your TOKEN, If you refer to the Facebook developer portal error codes It is due to Message failed to send because of an unknown error which can be an issue on the WhatsApp Cloud API side, therefore, heyoo-issue I suggest trying again after some time.

Kalebu avatar Aug 23 '22 09:08 Kalebu