Open alin-simionoiuDE opened 4 years ago
@alins did you follow these steps (https://github.com/jones2026/drone-flowdock/blob/master/docs/flowdock-setup.md) to create the token?
yap, pretty sure that token works. tried it is a jenkins job i have around and everything seems to check out.
was wondering if the way I have configured the token using flow_token: a30f9d
is causing the problem?
The token the Jenkins plugin uses is different from the one this plugin uses. Flowdock has labeled the type of token Jenkins uses as deprecated and that is why I opted to use the new one. https://www.flowdock.com/api/push
As for your syntax in your drone yaml everything looks good
done another test:
curl -XPOST https://api.flowdock.com/v1/messages/chat/a30f9d -d@flow.json
where flow.json
content is
{
"content": "test",
"external_user_name": "drone"
}
and it worked!
That endpoint is the deprecated one: https://www.flowdock.com/api/chat
Here is the replacement API flowdock suggests and the one this plugin uses: https://www.flowdock.com/api/messages
got it. executed all the steps in those instructions and i got my new token. trying it now
worked!!!. totally my bad on this one. really appreciate all your help here.
honestly is very confusing about the different api's and their tokens. it never occurred to me that there are two different token generators...one for the old style and to be deprecated api and a new one
No worries always glad to help!
Do you think a better error message might help instead of just the 404 response?
yes please. something along the lines of "your token is either invalid or has been generated to be used for the deprecated apis. make sure you have generated the token using
what am i doing wrong here?
obviously the
flow_token
there is not the actual token and i'm not usingfrom_secret
the error i see in drone is
Failed to post message, flowdock api returned: 404 Not Found