none
Client Credentials in query string

    Question

  • Hi,

    I am trying to use Bing Synonym API V2. Usual authentication is through http basic. Can I send the client credentials in the query string? 

    For e.g. AzureAPIURL/Bing/Synonyms/GetSynonyms?Query=%27vip%27&ClientId=abcd&AppKey=1234

    Thanks in advance.

    • Edited by RC Learner Saturday, September 14, 2013 1:20 AM
    Saturday, September 14, 2013 1:17 AM

Answers

  • Hi RC,

    Thanks for posting!
    From my experience, if we add this message in query, I guess it may not works. When we use the azure data market data, we need send our User_ID and Key using DataServiceContext.

    public static BingSynonymsContainer createConnection(String USER_ID, String KEY) 
            {
                USER_ID = "your ";
                KEY = "";
                context = new BingSynonymsContainer(new Uri("https://api.datamarket.azure.com/Bing/Synonyms/v1/GetSynonyms"));
                context.IgnoreMissingProperties = true;
                context.Credentials = new NetworkCredential(USER_ID, KEY);
                return context;
            
            }

    And BingSynonymsContainer class can be download from this Path:https://datamarket.azure.com/dataset/bing/synonyms

    And also you can refer to this link:http://msdn.microsoft.com/en-us/library/gg193417.aspx 

    Thanks.


    Will
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 16, 2013 10:18 AM