Why doesn't my API token work?
Asked by JConstantine:

I want to connect my **Cloud version of Confluence (free license)** to the **Jira Service Desk (Server version)** , so I need to generate the API token. I've generated it, used it with **curl** but when I'm trying to save it in the **Confluence Cloud Integration**I get this error:

*Your Confluence user and token credentials have been rejected by Confluence. If you need help with generating API tokens, see <https://confluence.atlassian.com/cloud/api-tokens-938839638.html>*

What might be the problem here?


Answers:
author: Niranjan
body: [@JConstantine](/t5/user/viewprofilepage/user-id/806963) - Not sure, but may be it is a cloud-server stuff. The doc says that

"API tokens can be used with the Jira Cloud and Confluence Cloud REST APIs."

comments: author: JConstantine
body: [@Niranjan](/t5/user/viewprofilepage/user-id/715719)This is obviously a cloud-server stuff, but I can't figure out what it is :(


author: Niranjan
body: [@JConstantine](/t5/user/viewprofilepage/user-id/806963) - As per the KB it says API token works only for Cloud-Cloud, but you are trying **Cloud version of Confluence (free license)** to the **Jira Service Desk (Server version)**


author: JConstantine
body: [@Niranjan](/t5/user/viewprofilepage/user-id/715719) Well, now I'm confused. I've been told that it's possible to do that. Check this out: [How can I integrate the Cloud version of Confluence into my Server version of Jira Service Desk?](https://community.atlassian.com/t5/Jira-Service-Desk-questions/How-can-I-integrate-the-Cloud-version-of-Confluence-into-my/qaq-p/1478991)   
So there's no way I can use a Cloud version of Confluence with the Server version of JSD? What I need is to able to use the Confluence knowledge base inside the Customer Portal in JSD.


author: Niranjan
body: [@JConstantine](/t5/user/viewprofilepage/user-id/806963) - You may need to use application links to link cloud and server products

<https://confluence.atlassian.com/cloud/link-to-server-products-from-cloud-744721656.html>


author: JConstantine
body: [@Niranjan](/t5/user/viewprofilepage/user-id/715719)I've read that as well, but I can't create the reciprocal link.  
![ReciprocalLink.png](https://community.atlassian.com/t5/image/serverpage/image-id/112043i54C2DEB8F546761D/image-size/large?v=v2&px=999 "ReciprocalLink.png")


author: Niranjan
body: There could be different reasons like network/firewall restrictions/outbound stuff

<https://confluence.atlassian.com/jirakb/unable-to-create-reciprocal-link-when-creating-application-link-855541357.html>


author: JConstantine
body: [@Niranjan](/t5/user/viewprofilepage/user-id/715719)On this page it is said that

*Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.*

But I'm using a cloud version of Confluence for which I can't create the reciprocal link.  


author: Bartosz Ornatowski
body: Hi [@JConstantine](/t5/user/viewprofilepage/user-id/806963)

The integration of JSD Server with Confluence Cloud has been added to JSD Server in 4.12.0 release. <https://confluence.atlassian.com/servicedesk/jira-service-desk-4-12-x-release-notes-1019396559.html#JiraServiceDesk4.12.xreleasenotes-confluence> and it should be working with the limitations based on the type of Confluence Cloud license you are using.

The response you have received means that Confluence has responded with the equivalent of "Wrong username or password" kind of response. That also means that JSD was successful in reaching Confluence Cloud and received a response, so on the networking level, everything seems fine.

Can you please verify that you can get a valid response from Confluence when trying to use the token manually? You can use a tool like postman for that or a simple command like

    curl -v https://mysite.atlassian.net --user me@example.com:my-api-token

One of the most common problems of this sort is a typo in the user email, copying the API token with additional characters or using a username instead of user email for the API token authorization.

Let me know if that doesn't help you solve your issue.

Cheers,  
Bart

comments: author: JConstantine
body: I still can't save it in the **Confluence Cloud Integration**.


Tags: api

cloud

confluence-cloud

token