Try PubSub+

Solace Cloud REST API authentication

petegehrmanpetegehrman Member Posts: 11

I have created an api token in my Solace Cloud account but when calling the below URL with postman/curl I am getting an authorization error. Am I missing something that I need to be doing?
https://api.solace.cloud/api/v0/services/{service-id}?apiToken={api-token}
Thanks,
Pete

Comments

  • marcmarc Member, Administrator, Moderator, Employee Posts: 298 admin

    Hi @petegehrman,
    I believe the issue is that the API expects the token specified as a header like Authorization: Bearer <Your New Token>

    Can you try this and see if it works for you?
    curl -X GET https://api.solace.cloud/api/v0/services -H "Authorization: Bearer <YOUR TOKEN>"

    From there you should be able to get your service ID and then query it directly.

  • petegehrmanpetegehrman Member Posts: 11

    Thanks @marc, that worked :) I didn't see that anywhere in the documentation.

  • marcmarc Member, Administrator, Moderator, Employee Posts: 298 admin

    @petegehrman Glad it worked. And thanks for the feedback! I'll take a closer look at the docs.

Sign In or Register to comment.